Re: post-checkout hook
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 29 Apr 2014 10:53:08 +0100 (BST)
Hi, Dean.
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 [1]. TortoiseSVN supports client-side hooks [2] 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 [3] 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. [4]
Regards,
[1] http://stackoverflow.com/questions/804970/is-there-a-subversion-checkout-hook-or-something-similar
[2] http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks
[3] http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html
[4] http://subversion.apache.org/mailing-lists.html
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.