To set properties use the
svn propset command.
svn propset Author 'David Precious'
There are some useful keywords which can be set, the value of which will be substituted for 'tags' in the file itself.
The keywords are updated when the file is committed to the repository.
Some of the useful ones are:
$Rev) which will expand to the revision number the file was last updated in, like:
$Revision: 23 $
$Idwhich will expand to
$Id: file.pl 23 2006-0901 13:05:51Z dave $
$Date- the date this revision was committed to the repo.
$Author- the name of the person who committed this version to the repo.
To set the keywords which should be replaced, use:
svn propset svn:keywords 'Id Revision' file.pl
Unless you use the
svn propset command above, the anchors (e.g. ”
$Id) will *not* be replaced with their value... SVN will not mess with your file unless you've explicitly told it to.
To change a commit log entry after the commit, use:
svn propset --revprop -r 25 svn:log 'new log entry'
This won't work by default, the pre-revprop-change hook must be created first.
To have certain properties set automatically, you'll need to edit your SVN client config file - typically
~/.subversion/config for *nix boxen.
[miscellany] section, set
enable-auto-props to true.
[auto-props] section (probably need to create it), have lines like
[miscellany] enable-auto-props = true [auto-props] *.pl = svn:keywords=Id Revision;svn:eol-style=native;svn:executable *.pm = svn:keywords=Id Revision;svn:eol-style=native
The above example will make all Perl scripts added to the repository have the Id and Revision svn:keywords set automatically, they'll be marked executable (only the scripts (*.pl) not the modules (*.pm)), and SVN will remember that they are text files and that it should use whatever the client machines native line ending style is when they're checked out.
I originally thought that these settings went in the repository's config file (<repodir>/conf/svnserve.conf) but they don't. There doesn't seem to be too much easy documentation on this available.
To ignore certain files in a directory (files which should not be under version control for whatever reason) use the
svn:ignore property on the directory - the value should be a multi-line list of patterns to exclude, one pattern per line.