Re: post-checkout hook
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 29 Apr 2014 10:53:08 +0100 (BST)
Thanks for your mail.
> Our procedure is to:
So 'svn checkout' could automatically run a user-defined script after it finishes checking out? That's a well known idea, and there are several reasons why that has not been provided, not least of which is it's very simple to write your own script that runs 'svn checkout' followed by your existing version-determining batch script. Is that approach unreasonable for you?
When you say "Security issues are involved" is that code-speak for "The managers will let us install and run 'svn' but they won't let us install a little batch script which calls 'svn'"? (No offence meant, but that's what it sounds like to me.)
A brief mention of some other possible options. Subversion supports server-side hooks for write operations, as you presumably know, but it doesn't sound like you're looking for a server-side action. Anyway, there are no plans for server-side hooks for read operations . TortoiseSVN supports client-side hooks  on a few operations including 'update', which you might be able to use instead of 'checkout', but I can't imagine having to run TortoiseSVN instead of 'svn checkout' is any better than having to run the script I suggested instead of 'svn checkout'. Subversion supports keyword substitution  so you could have a text file in which the '$Revision: X' is automatically set upon checkout to the revision number in which *this* file last changed, if you can arrange to have such a file that's always changed when a new version of your project is committed.
p.s. Questions like this are preferred on the 'users@' mailing list, reserving 'dev@' for bug reports and design / development. 
This is an archived mail posted to the Subversion Dev mailing list.