This is my own cheat sheet for svn propset, which I struggle with every few months. Hopefully, I can remember this next time..
Problem : I want to ignore certain files in my working copy, when I do an svn status, svn commit etc. I don’t want the cache, or my .pyc files to get committed.
Solution : svn pe svn:ignore .
this should open vim, and then on each line I enter the files I want to ignore..
*.pyc
*.swp
*.tmp
cache/*
Caveats: I need to do this for each directory, I can’t find a recursive option for this.. so when I’m doing python, and each application has it’s own dir, I need to do it for each sub dir.
PS: Yes, I’m using python these days.. have to do it for a client.
You can actually do this by using your svn config file. This will essentially have these rules global.
You can actually do this by using your svn config file. This will essentially have these rules global.
The “recursive” solution you are seeking is the global-ignores option in your .subversion/config file.
My .subversion/config file has:
global-ignores = CVS .DS_Store Thumbs.db WS_FTP.LOG _notes _vti_* *.LCK
Subversion is an awesome version control system. If you haven’t already, get a copy of the Subversion book: http://svnbook.red-bean.com/
The “recursive” solution you are seeking is the global-ignores option in your .subversion/config file.
My .subversion/config file has:
global-ignores = CVS .DS_Store Thumbs.db WS_FTP.LOG _notes _vti_* *.LCK
Subversion is an awesome version control system. If you haven’t already, get a copy of the Subversion book: http://svnbook.red-bean.com/
John and Mike,
The reason why I didn’t mention the svn config file, is because I wanted a way to make it work for anyone who did an svn co on my project.
This way, whether you have windows, or a unix bases system.. or if you don’t know where to edit the file, you don’t accidentally add things.
John and Mike,
The reason why I didn’t mention the svn config file, is because I wanted a way to make it work for anyone who did an svn co on my project.
This way, whether you have windows, or a unix bases system.. or if you don’t know where to edit the file, you don’t accidentally add things.
Without auto-props or global-ignores, there’s no way to recursively define svn:ignore (the performance hit would be too great: SVN would have to backtrack every versioned parent directory to figure out what files to ignore). If you have, however, a bunch of directories that need the proper ignore props, you can always use svn propset with the -R flag, which makes it recursive.
Without auto-props or global-ignores, there’s no way to recursively define svn:ignore (the performance hit would be too great: SVN would have to backtrack every versioned parent directory to figure out what files to ignore). If you have, however, a bunch of directories that need the proper ignore props, you can always use svn propset with the -R flag, which makes it recursive.