Subversion Administration

From Elvanör's Technical Wiki
Jump to navigation Jump to search

This article is a tutorial to Subversion repository administration.

Design choice: repository setup

You can choose to have one repository per project, or only one single repository containing each project in a separate directory. The single repository setup is easier, but the inconvenient is that the revision number will go up for some projects that did not undergo any changes (if some other projects are updated).

Importing projects

While doing the initial import, remember that if you specify a path, only its contents will be added, thus, if you want to actually add the directory, remember to do a svn mkdir first.

This is not the case when you do an initial checkout of a project.

Tips & Hints

  • Subversion does password caching by default, so don't be surprised if you are not asked for a password after the first time.
  • There is a list of patterns (for example, *.o files) that are automatically ignored by svn. This is done client-side and can be modified by the client configuration files.
  • Ignore patterns can be specified by running svn propedit svn:ignore directory. Note that this does NOT affect items already put under version control (eg, this makes sense only for items not under version control).
  • Ignore patterns can be set recursively by adding the -R option to the command svn propset, for example. However I don't know if it is possible to add ignore patterns recursively, since propset erases the previous information.
  • The bottom line is that files that need to be ignored on *every* platform (.o files, for example) should be set using the svn:ignore property. What is dependent of the development platform (eg, .directory files that seem to appear with KDE/KDEsvn) should be set by the client.
  • On UNIX, the client configuration file is at ~/.subversion/config. The line to change is global-ignores, set for example to:
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .directory

Useful links

Subversion book