svnpropertiesserver-sidepre-commit-hookversion-control-keywords

Automatically add svn keyword properties for new files (server-side)


I want to add svn properties (like svn:keyword=Id Date Rev Author) to files upon commits of 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-side: 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.


Solution

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