Subversion

Properties

Each file or directory can have special properties associated to it.

svn:externals

This helps you mount another subversion repo path on a directory. e.g. if I want my "img" folder to be pulled from the URL "http://example.com/images", then you can add the external "http://example.com/images img" on a directory. The next svn update will create the "img" directory, and download the contents with the URL. If you want multiple externals you can put them on separate lines.

This is powerful but watch out of the following:

  • It can be slower when doing svn updates, as 2 separate updates are made.

  • Branching will get complicated.

  • Some programs have an option to skip updates for directories specified by svn:externals (e.g. teamcity). If your externals are not being updated then this may be the reason.

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 that 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.

Published: Saturday, 3 February 2007