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

Re: Need help for subversion

From: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Fri, 29 Jan 2010 01:54:02 -0600

On Jan 28, 2010, at 19:13, Hiroshi Miyazaki wrote:

>> Did you check out the subversion book already ?
>
> http://svnbook.red-bean.com/nightly/en/svn.ref.reposhooks.html
>
> I lookovered these spec.
>
>> post-commit
>> post-lock
>> post-revprop-change
>> post-unlock
>> pre-commit
>> pre-lock
>> pre-revprop-change
>> pre-unlock
>> start-commit
>
> I'd like to confirm these hooks can be invoked by checkout command(functionality).
> (I'm not sure this capability.)

No, they cannot. The hooks are invoked by Subversion on the server at the times that the file names suggest. For example, the post-commit hook script is run after a commit is done. The pre-lock hook script is run before a user tries to lock a file. And so on. There is no hook script that has "checkout" or "update" in its name, so there is no hook script that runs on the server when a user checks out or updates a working copy. There are also no hook scripts of any kind that run on the client; they're all on the server.

>> How do you want the additional functions perform ?
>
> Hook functionality retrives DataBase data and embed in the checked-out file along with checkout.
>
>> By native code or just simply python script code ?
>
> Basically, Java code.

Sounds like you want a client-side hook script. You could write a wrapper script around the Subversion client. Instead of calling "svn update" or "svn checkout", users would call your script. Your script would then call "svn update" or "svn checkout" and then do whatever additional database work you need.

Or, some Subversion clients may implement client-side hooks, which you might consider using for this purpose if those happen to be the clients your users want to use. TortoiseSVN for Windows, for example, has this feature. But remember it's a TortoiseSVN-specific feature; it's not a feature of Subversion itself. For questions about how this feature works, you have to ask the TortoiseSVN people.

http://tortoisesvn.tigris.org/tsvn_1.5_releasenotes.html#client-side-hooks
Received on 2010-01-29 08:54:47 CET

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.