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

Re: Add subversion rev number in committed file

From: Paul Koning <Paul_Koning_at_dell.com>
Date: Tue, 5 Aug 2008 12:02:09 -0400

>>>>> "CAVAILLES" == CAVAILLES Philippe <Philippe.CAVAILLES_at_egis.fr> writes:

 CAVAILLES> Hello, Does someone know if it is possible to add the
 CAVAILLES> subversion revision number in committed files?

 CAVAILLES> I have tried to use a pre-commit hook script.

That won't work; you can't change things in pre-commit scripts, that's
a documented restriction.

It's much easier than that. Set the svn:keywords property on the
files where you want this:

       svn:keywords : LastChangedRevision

Then Subversion will fill in the rev number when the
LastChangedRevision keyword occurs in the file, like this:

       $LastChangedRevision: 77951 $

There are a number of keywords you can set; see the manual. They
basically match what CVS has, except for "Log" which is intentionally
not provided.

    paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-05 18:02:48 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.