views:

524

answers:

1

I want to add svn properties (like svn:keyword=Id Date Rev Author;) to files on commits on new files.

For this to work there may be two main options:

  1. client-side, altering the autoprops in the svn client configuration
  2. Server-sode, do some magic with commit-hooks

The client side is not always desirable, as control over the client set up is needed. I want to solve this on the server. How can this be done.

+4  A: 

The Subversion docs say it's a bad idea to modify a commit on the server side.

Instead, you could do something like a customized version of the svn_apply_autoprops script periodically through cron (or even on the server triggered by a commit). The svn_apply_autoprops script is a little more general than what you need, but it should be straighforward to set up the appropriate config file.

As of this post, the subversion web site is migrating under apache.org, and I couldn't find the docs for the contrib tools.

Dave Bacher
The scrubbing cron script that modifies svn properties on files is my way to go. I have read the same comment on the 'modifying the commit'. For the moment I ask users to load a svn configuration script in their svn client (tortoisesvn).
jochem