How can I recursively configure svn status to hide ignored files?
My directory structure looks like the following:
project/ app1/ app2/ settings.py
From within the
project directory, I ran
svn propedit svn:ignore . This only ignore files from within project director excluding its sub-directories. I can run the svn ignore again from within each of the folder and it will work. Is there an internal svn command or option which can recursively do it for me or should I resort to a script to perform the ignore within each sub-folders of my project?
I’ve set my ignored files to be:
However, whenever I do a
svn status, I still see the above files. Is there a way to tell
svn status to hide ignored files recursively?
2 Solutions collect form web for “How can I recursively configure svn status to hide ignored files?”
svn propedit only works on one target at a time. TortoiseSVN has an option to apply properties recursively, but if you’re not using it or another GUI that has that option, you would have to do it with a script.
However, what you should really do is set your
global-ignores to ignore the two file patterns you mentioned. According to the most recent documentation,
*.swp are included in the default ignores for Subversion 1.6, but you can add them if your
config file doesn’t have them.
The location of your
config file is platform-dependent; see the above documentation link.
global-ignores is in the
Only problem with the global-ignores is that you need a file extension. In some programs there are files without an extension (or there are just many extensions). An example are the tmp files in CakePHP.
I fixed this by (in Linux bash shell):
cd app/tmp for a in `find . -type d |grep -v svn`; do svn propset svn:ignore '*' $a; done