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:
*.pyc
*.swp
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?
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, *.pyc
and *.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 miscellany
section.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With