Subversion - ignoring files in a directory

2004-03-18

Today I figured out how to handle ignoring certain file types when doing a status check. There are 2 methods of doing it. One is in the global configuration, namely the config file stored in Application Data\Subversion (assuming windows).

The other is to define a value for the property on a directory, and it will only affect that directory. The global would have to be set by all users. The property on a directory only has to be set once, and then everyone that checkouts out the directory will have the same ignores. The only problem is it appears the ignore only works on the directory it’s assigned to. It doesn’t affect sub-directories (or at least I haven’t figured out how to have it do that just yet).

Anyhow, the procedure is quite simple. Using svn propedit svn:ignore {directory} and it will bring up a file in your defined editor. If the directory already has values for the property, these will show in the file. Otherwise it will start empty.

Then you just list the filetypes and directory names you want ignored, each on one line. It appears to be case sensitive, so you have to do .bak .BAK etc to ensure full coverage.

As I said, it also appears necessary to do it on sub-directories as the property appears to only apply to the current directory.


Comments: