(was: "getting svn to ignore tags files")
I wanted to ignore all "tags" files in a particular subversion project, but I couldn't find a way to apply an ignore pattern recursively to all subdirectories within a certain directory.
Options which don't work for me:
- It's possible to add
tagsto the global-ignores config setting in$HOME/.subversion/config, but the problem with that is it's not shared across different working copies of the project on different computers. I tried adding$HOME/.subversionto revision control, but that didn't work because I couldn't check it out on any other computer. - It's also possible to do a
svn propset -R svn:ignore tags .in the base directory in which I recursively want to ignore tags files. That unfortunately has the side-effect of clobbering any previoussvn:ignoresetting in all subdirectories.
tags to the end of the svn:ignore property in all subdirectories of the current directory)find . -type d \! -path \*.svn\* | while read DIR; do
OLDIGNORE="`svn propget svn:ignore \"$DIR\"`"
svn propset svn:ignore "`echo \"$OLDIGNORE\"; echo 'tags'`" "$DIR"
done
