This is just a note to myself, since I seem to keep forgetting how to do that properly. After reading the chapter in the svn-book properly and using enough [–]help I figured it out and I am scared to forget how to get it right again :-). Here is how I got it working for me.
svn:ignore
cd
into the root directory of my working copy.- Create a file .svnignore in the root of my working copy, with the following content
*.pyc
*.log adjust that as you need it, of course.
- Run
svn -R propset svn:ignore -F .svnignore .
Note the “.” at the end (that I always forgot in the beginning), that means all the directories get effected. The “-R” means that the ignore shall apply recursively, therefore you need to be in the root to have it apply to the entire tree. - Now commit all the directories, yes you have to commit them all,
svn commit * -m"set ignore"
that was also not mentioned in the svn-book, I think. But how boring would the world be without those little challenges? - And now run
svn status
and all the files that shall be ignored should be gone.
So notice here, ignore works on the directories, I believe. That’s why you also have to use the “.” and when commiting you see that all the directories get commited.
svn:keywords
cd
into the root directory of my working copy.- Create a file .keywords in the root of my working copy, with the following content
Author
Rev
Id adjust that as you need it, of course.
- Run
svn -R propset svn:keywords -F .keywords *
Note the “*” at the end (that I also always forgot in the beginning), that tells that all the files are effected. The “-R” means that the keywords shall apply recursively, therefore you need to be in the root to have it apply to the entire tree. - SubVersion has modified all the files that contain those place-holders (like $Id$, $Rev$, etc.) and has replaced them with the proper content. Now commit all the files (now really the files have changed!), here too - you have to commit them all,
svn commit * -m"set keywords"
.
So notice here, keywords works on the files. That’s why you also have to use the “*” and when commiting you see that all the files get commited.