Monday, November 19, 2012

Subversion - Ignore Files or File Patterns Using svn:ignore Property Not Working?

Using the svn metadata or svn properties svn:ignore, you may ignore files or file patterns within a folder. Somehow, it is not working and you are probably wondering why. Then, you came to the right place.

In order to properly set it up, it must meet the following conditions.
1. It must be a file.

2. It must be a file pattern using wildcards.

3. It must be a direct child directory

4.It must NOT be a PATH to a file

5. It must NOT be a PATH to a directory

6. It must NOT be previously under version control. 

Adding a file or directory to the svn:ignore property won't take effect if its already in subversion.

7. The property is in a per directory basis.

When all of the above is met, then you should have no problems with your svn:ignore property.

Just a quick revisit on the commands.


svn propset svn:ignore <File,File Pattern, Directory, Directory Pattern> <Path/To/Directory>
svn ps svn:ignore <File,File Pattern, Directory, Directory Pattern> <Path/To/Directory>


svn propget svn:ignore
svn pg svn:ignore


svn propedit svn:ignore <Path/To/Directory>
svn pe svn:ignore <Path/To/Directory>

Note: you might need to setup an editor for subversion using the user environment variable
export SVN_EDITOR=vim


svn propdel svn:ignore <Path/To/Directory>
svn pd svn:ignore <Path/To/Directory>

Oh, and if you don't know what is it for right now, just think that it is meant to ignore something from being handled by subversion for whatever reason. That's it.

  • Related Links Widget for Blogspot

No comments: