简体   繁体   中英

SVN Ignore Files when propset and prop edit not working

Here is an example of my SVN every time I update

    D     C 2d/flatImages/iEpic.png.meta
          >   local unversioned, incoming add upon update
    D     C 2d/flatImages/iegendary.png.meta
          >   local unversioned, incoming add upon update

I have tried the following:

svn propedit svn:ignore "png.meta" .

svn propedit svn:ignore ".meta" .

svn propset svn:ignore "*.meta" .

(and a few others)

I cannot seem to ignore these various types of meta files and I have to manually resolve 20-30 issues every time I update.

Is there something I am doing wrong with these property settings or is there another way I can properly ignore all .meta files?

You cannot ignore files that have already been added into Subversion.

What is going on is what should be expected. You have an older revision of the repository, and added those two files locally. Someone else in a later revision added them anyway. When you update your revision, Subversion is telling you that there's a conflict. It wants to add these two files to your working copy, but you already have these files there.

The easiest way to handle this is to move your files out of the way, and do another update. Then, if these files should not be in the repository, delete them and commit the changes. It is possible that someone will add them back in, and may do so accidentally.

Imagine you're working in revision 100, and you delete 2d/flatImages/iEpic.png.meta because it shouldn't be there. You commit revision 101.

Another user checks out revision 100 (where the files are still there) and modifies 2d/flatImages/iEpic.png.meta . When they update to revision 101, they'll get a conflict: Incoming delete local modified. If they resolve the conflict by accepting the working copy, or by marking the issue as resolved , 2d/flatImages/iEpic.png.meta will be marked for an addition. When they commit revision 102, 2d/flatImages/iEpic.png.meta will be back in the repository despite the svn:ignore .

You can use a pre-commit hook that prevents these files from being added to the repository. If someone attempts to add them in, their commit will be rejected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM