Subversion: How To Ignore Files From Status Display

By Angsuman Chakraborty, Gaea News Network
Saturday, June 23, 2007

In directories under subversion there may be files which you do not want to add to subversion. Normally such files would show in subversion status (svn stat) with ? in front of them. This is useful to let you find files that you may have missed. However in some cases there are files you want to intentionally miss, such files then merely clutter the status display. There is a simple fix.

First do a subversion status display. For example your output may be something like:

? etc/myexcel.properties
? etc/myexcel.log
? etc/myexcel.script
? etc/myexcel.lck
? classes/com

You may want to exclude all the myexcel files in etc directory. To do that type:
svn propedit svn:ignore etc

A file in your favorite editor will open up. Add the files you want to exclude there, one per line. In this example you may want to add:

myexcel.properties
myexcel.log
myexcel.script
myexcel.lck

Save the file and exit from the editor.
Now do a commit and you are done:
svn commit -m "Added files to subversion ignore list."

Note 1: You may have to export / set EDITOR variable. I did:
export EDITOR=gedit

Note 2: Adding files in subdirectories directly didn’t work. For example the following didn’t work:

etc/myexcel.properties
etc/myexcel.log
etc/myexcel.script
etc/myexcel.lck

So to add any file / directory to ignore list, you have to change the properties for the parent directory.

Discussion
January 1, 2010: 11:37 am

this is a good thing u did mr…:p

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :