Search code examples
svnsvnignoresvn-propset

If I use svn propset svn:ignore -F multiple times is the property appended to or replaced?


Say I want to convert a .cvsignore file to an svn:ignore property while converting an old cvs project to svn. Then someone else comes along and, not realizing that .cvsignore is no longer in use, changes the .cvsignore file to update new ignored files. If I run svn propset svn:ignore -F .cvsignore . again, will the file's contents be appended to the earlier value set by the first run or will the file's contents overwrite the earlier value? The SVN book didn't seem to have an answer for me.


Solution

  • Have you tried this? A quick test would have given you the answer pretty quick.

    No it won't append the .cvsignore to what's already in the svn:ignore property. Instead, it'll completely replace the old value with the current value of .cvsignore. This is what you want anyway.

    For example, .cvsignore had target and log.txt in it. You run your svn propset command, and you're ignoring target and log.txt.

    Now, someone edits .cvsignore and adds temp to it. .cvsignore now has three files in it (target, log.txt, and temp). Run svn propset again, and svn:ignore will also have these three files.