[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Automatic replacement on commit

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 8 Sep 2008 12:18:39 -0400

First the bad news:

You cannot do what you want with Subversion. Why? Because Subversion
hooks run on the server side while ClearCase hooks run on the client
side. That means you cannot modify the contents of a file before you
do a commit. You can prevent the commit, but you cannot change the

This really isn't as bad as it sounds. First the reason for this:

* As a ClearCase administrator for 15 years, I found the client side
execution of triggers one of the banes of my existence. I spent a lot
of my time making sure all client machines were configured correctly
to make sure my trigger ran.

When you have 200 client machines, and they get replaced on average
every four years, you have 50 machines each year getting replaced or
about once per week. That meant I spent a few hours each week setting
up a new computer.

Then, there were the machines that upgraded their OS, or had a virus
and the System Admins decided to reformat the drive, or got a new
drive, etc. All of these had to be configured too.

In Subversion, only one machine has to be able to run the "hook" (what
Subversion calls a "trigger"), and that's the server. I no longer have
to worry about client configurations. I no longer spend 20% of my time
configuring client machines.

Now, we get to the good news:

ClearCase does not have the concept of 'keyword' expansion. Therefore,
you had post-processing, pre-checkin triggers that would handle the
keyword expansion.

However, Subversion does do keyword expansion when you request it.
Therefore, their is no need for this trigger script. Take a look at
the "svn:keywords" property in the manual for full details:

David Weintraub
On Mon, Sep 8, 2008 at 8:14 AM, Matthieu BROUILLARD
<matthieu.brouillard_at_agfa.com> wrote:
> Hi everybody,
> In my company we were used to manage our source files with Clearcase.
> We want to migrate under subversion, but actually we are missing a
> functionality that we need.
> For some files, there is an automatic replacement that is done before commit
> (with a perl script on the Clearcase server).
> This automatic replacement is a "version" generation in the header of the
> file (Ex: 8.4 then next commit 8.5 ).
> This meta-information is used in some process for our software (in fact DB
> management with an applicative versioning of the DB objects/data/).
> Is there a way to handle this with Subversion?
> Using directly subversion and the keyword replacement mechanism,
> Using an apache mod,
> Using something else?
> Thank you for your help.
> Cordialement, best regards,
> Team Manager CIS
> Agfa HealthCare Enterprise Solutions
> HIS-CIS Business Unit
> T: +33 5 57 77 55 69 (internal: 470)
> M: +33 6 09 38 58 73
> matthieu.brouillard_at_agfa.com
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-08 18:19:12 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.