Subversion Properties

Published: Saturday, 3 February 2007

Subversion can maintain extra info against a file or directory in the way of properties, this doesn’t affect the contents of the file, but can have an effect on the file locally.

Editing properties

Use svn command line to either delete, edit, get, list all properties, or set a property on a file or a directory

 propdel (pdel, pd)
 propedit (pedit, pe)
 propget (pget, pg)
 proplist (plist, pl)
 propset (pset, ps)

svn:eol-style

This is end of line style in text files. It must be one of native, LF, CR, or CRLF.

For unix, use LF. For DOS/Windows, user CRLF.

This is useful if you’re writing shell scripts for unix but you are editing the file on Windows.

svn:keywords

This is for keyword expansion. e.g. if you set Revision as part of the value, then $Revision $ will be automatically expanded in the source code by your editor.

svn:ignore

This is set on a directory. It contains a list of files or directories that will not be checked into subversion. It is useful if your build will generate files that you do not want in subversion. An example would be everything in the target directory created by maven. In your project directory, set the svn:ignore property to value target.

If there are still files not being ignored, check you haven’t checked them into subversion. The command svn info target will tell if the target directory was checked in.

You can use the * wildcard to match any string.