Limiting open port RST re... 入手苹果 G5 键盘一枚
十月 02

SVN users who wish to ignore multiple files with distinct names in the same folder beware : you must use a file and batch-process.

It’s not difficult to figure out that to tell SVN to ignore a file, you could use:

svn propset svn:ignore [filename] [folder]

So if I have a file ‘settings.py’ in folder config, in the config folder I would simply type:

svn propset svn:ignore settings.py .

But what if I also have another file, say ‘me.py’, in the same folder that I want to ignore? On top of that, what if I have other files with a .py extension that I don’t want to ignore? The following will not work:

svn propset svn:ignore “settings.py me.py” .

(incorrect syntax)

svn propset svn:ignore “*.py” .

(but i don’t want to ignore some .py files)

nor would the following, because svn for some odd reason seems to only take one propset assignment from the commandline – meaning only one of the files will be ignored:

svn propset svn:ignore settings.py .
svn propset svn:ignore me.py .

turns out you must make a file with the filenames on separate lines, then call with the -F parameter. For example in the above case, I would create a file “ignore.me” with settings.py and me.py on separate lines, then call

svn propset svn:ignore -F ignore.me .

Annoying. SVN should let you set the same property on multiple files with multiple command-line calls.

dirk 发表于 2009-10-02 星期五

0 Responses to “svn:ignore propset”

  1. 尚无评论

发表评论 »