From ConShell
Jump to: navigation, search

Subversion is version control system gaining popularity as a replacement for CVS.

Property setting

If you want to interpolate keywords like $Id$ and $URL$ the following should be used in your ~/.subversion/config file

enable-auto-props = yes

* = svn:keywords=Author ID URL Date Rev

To retroactively set these on a file committed prior...

svn propset svn:keywords "Id URL" <filename>
svn commit

Re-use a (failed) commit message

Sometimes a commit will fail and the log message will be saved to a file e.g. svn-commit.tmp

Here is how to re-use that message which took you so long to type.

svn commit -F svn-commit.tmp


commit hooks are handy for catching errors and doing other strange things.

For example, when using subversion with Puppet it is really nice to have a pre-commit hook which runs puppet --parseonly on the files being committed to validate they have the correct syntax.

Another example is using svnspam in a post-commit to have a nicely-formatted audit trail for developers and/or administrators.

List of repo

Example of using svn list using svn+ssh method.

$ svn list svn+ssh://svnserver/path/to/svn