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

[TSVN] Client side hooks.

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2005-09-30 13:34:29 CEST

On the Subversion developers list theres a bit of to-ing and fro-ing
about having Subversion replace magic strings with current revision info.
The reasons for it's intended use may vary but being able to pop up the
svn revision number in an about box ah-la TortoiseSVN's one is a good
example.

On the client side there is a facility to manually run "SubWCRev.exe"
and have string replacement take place. It would normally be manually
run in a build script, FinalBuilder or the like so the facility is
provided, in around about way, but it's a separate process from the
usual edit test edit cycle. Not everyone has the luxury of FinalBuilder.

So. I was wondering if TortoiseSVN could be made to support client side
hooks for say Commit and Update. That this would assist in the
"automation" so to speak by ensuring the correct revision info was
always present in a file. Obviously it becomes the hooks responsibility
to run SubWCRev or whatever, on the files specified in the hook script.

So my method of getting the revision info into the latest compile never
touches a revisioned file.
The versioned file revision.txt contains one line of code.
CONST Current_Revision: string = '$WCREV$';

In a batch file the magic line which creates a .inc file for including
into Delphi code at the appropriate place
SubWCRev . revision.txt revision.inc -f

Instead of running the batch file manually, if it was invoked by a hook,
the human error factor is one step removed.
Server side hooks are not suitable for contacting every repository visitor.

Am I making sense or wasting bandwidth.

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Sep 30 13:35:04 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.