You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hiroshi Miyazaki <mi...@jp.fujitsu.com> on 2010/01/28 10:51:25 UTC
Need help for subversion
Hello,
I have to develope applications using the Subversion.
Then, I'm in the trouble.
Could I ask some questions?
According to the Subversion Wiki,
it seem to be possible to develop hook methods.
Therefore, I'd like to use its capability.
When we checkin and checkout certain files into/from Subversion (through command line),
is it possible to invoke an "hook method (exit routine)", which can add some extra
user required function.
If possible, could you teach me the way to develop the "hook method (exit routine)".
It would be grateful.
I'm on the "hook", then need your help.
~~~~~
Thank you in advance and best regards,
=====================================
Hiroshi Miyazaki
Fujitsu
1-17-25 ShinKamata, O-ota-ku, Tokyo, Japan
Tel) +81-3-6424-6276 (ex. 7053-8779)
Fax) +81-3-6424-6446 (ex. 7053-9081)
=====================================
Re: Need help for subversion
Posted by Ryan Schmidt <su...@ryandesign.com>.
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
Re: Need help for subversion
Posted by Hiroshi Miyazaki <mi...@jp.fujitsu.com>.
Hello Eric san,
Thank you for your response.
>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.)
>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.
Thank you and best regards,
----- Original Message -----
From:"Eric Lee" <pg...@gmail.com>
To:"Hiroshi Miyazaki" <mi...@jp.fujitsu.com>
CC:"Andrey Repin" <us...@subversion.apache.org>, "Andrey Repin" <an...@freemail.ru>
Subject:Re: Need help for subversion
>Miyazaki
>
>Did you check out the subversion book already ?
>
>There are a number of hooks on subversion including,
>
>post-commit
>post-lock
>post-revprop-change
>post-unlock
>pre-commit
>pre-lock
>pre-revprop-change
>pre-unlock
>start-commit
>
>These is take from a hooks directory of a svn repository.
>
>How do you want the additional functions perform ?
>
>By native code or just simply python script code ?
>
>
>
>Thanks,
>
>
>Regards,
>Eric,
>
>
>2010/1/29 Hiroshi Miyazaki <mi...@jp.fujitsu.com>
>
>> Dear Andrey san,
>>
>> Thank you for your response,
>>
>> >Hooking is only server-side, and only handle commits.
>>
>> It seems to be regrettable.
>>
>> It is essential to use the subversion and
>> provide the checkout functionality.
>> Are there any ways to achieve this capability by anay means?
>>
>> Thank you and best regards,
>>
>> ----- Original Message -----
>>
>> From:"Andrey Repin" <an...@freemail.ru>
>> To:"Hiroshi Miyazaki" <mi...@jp.fujitsu.com>,
>> users@subversion.apache.org
>> CC:Re: Need help for subversion
>>
>> >Greetings, Hiroshi Miyazaki!
>> >
>> >> According to the Subversion Wiki,
>> >> it seem to be possible to develop hook methods.
>> >> Therefore, I'd like to use its capability.
>> >> When we checkin and checkout certain files into/from Subversion (through
>> command line),
>> >> is it possible to invoke an "hook method (exit routine)", which can add
>> some extra
>> >> user required function.
>> >
>> >Hooking is only server-side, and only handle commits.
>> >Without more information about your intentions and supposed program
>> >architecture, it's hard to suggest anything.
>> >
>> >
>> >--
>> >WBR,
>> > Andrey Repin (anrdaemon@freemail.ru) 28.01.2010, <17:21>
>> >
>> >Sorry for my terrible english...
>> >
>> >
>> =====================================
>> Hiroshi Miyazaki
>> Fujitsu
>> 1-17-25 ShinKamata, O-ota-ku, Tokyo, Japan
>> Tel) +81-3-6424-6276 (ex. 7053-8779)
>> Fax) +81-3-6424-6446 (ex. 7053-9081)
>> =====================================
>>
>>
>
=====================================
Hiroshi Miyazaki
Fujitsu
1-17-25 ShinKamata, O-ota-ku, Tokyo, Japan
Tel) +81-3-6424-6276 (ex. 7053-8779)
Fax) +81-3-6424-6446 (ex. 7053-9081)
=====================================
Re: Need help for subversion
Posted by Eric Lee <pg...@gmail.com>.
Miyazaki
Did you check out the subversion book already ?
There are a number of hooks on subversion including,
post-commit
post-lock
post-revprop-change
post-unlock
pre-commit
pre-lock
pre-revprop-change
pre-unlock
start-commit
These is take from a hooks directory of a svn repository.
How do you want the additional functions perform ?
By native code or just simply python script code ?
Thanks,
Regards,
Eric,
2010/1/29 Hiroshi Miyazaki <mi...@jp.fujitsu.com>
> Dear Andrey san,
>
> Thank you for your response,
>
> >Hooking is only server-side, and only handle commits.
>
> It seems to be regrettable.
>
> It is essential to use the subversion and
> provide the checkout functionality.
> Are there any ways to achieve this capability by anay means?
>
> Thank you and best regards,
>
> ----- Original Message -----
>
> From:"Andrey Repin" <an...@freemail.ru>
> To:"Hiroshi Miyazaki" <mi...@jp.fujitsu.com>,
> users@subversion.apache.org
> CC:Re: Need help for subversion
>
> >Greetings, Hiroshi Miyazaki!
> >
> >> According to the Subversion Wiki,
> >> it seem to be possible to develop hook methods.
> >> Therefore, I'd like to use its capability.
> >> When we checkin and checkout certain files into/from Subversion (through
> command line),
> >> is it possible to invoke an "hook method (exit routine)", which can add
> some extra
> >> user required function.
> >
> >Hooking is only server-side, and only handle commits.
> >Without more information about your intentions and supposed program
> >architecture, it's hard to suggest anything.
> >
> >
> >--
> >WBR,
> > Andrey Repin (anrdaemon@freemail.ru) 28.01.2010, <17:21>
> >
> >Sorry for my terrible english...
> >
> >
> =====================================
> Hiroshi Miyazaki
> Fujitsu
> 1-17-25 ShinKamata, O-ota-ku, Tokyo, Japan
> Tel) +81-3-6424-6276 (ex. 7053-8779)
> Fax) +81-3-6424-6446 (ex. 7053-9081)
> =====================================
>
>
Re: Need help for subversion
Posted by Hiroshi Miyazaki <mi...@jp.fujitsu.com>.
Dear Andrey san,
Thank you for your response,
>Hooking is only server-side, and only handle commits.
It seems to be regrettable.
It is essential to use the subversion and
provide the checkout functionality.
Are there any ways to achieve this capability by anay means?
Thank you and best regards,
----- Original Message -----
From:"Andrey Repin" <an...@freemail.ru>
To:"Hiroshi Miyazaki" <mi...@jp.fujitsu.com>, users@subversion.apache.org
CC:Re: Need help for subversion
>Greetings, Hiroshi Miyazaki!
>
>> According to the Subversion Wiki,
>> it seem to be possible to develop hook methods.
>> Therefore, I'd like to use its capability.
>> When we checkin and checkout certain files into/from Subversion (through command line),
>> is it possible to invoke an "hook method (exit routine)", which can add some extra
>> user required function.
>
>Hooking is only server-side, and only handle commits.
>Without more information about your intentions and supposed program
>architecture, it's hard to suggest anything.
>
>
>--
>WBR,
> Andrey Repin (anrdaemon@freemail.ru) 28.01.2010, <17:21>
>
>Sorry for my terrible english...
>
>
=====================================
Hiroshi Miyazaki
Fujitsu
1-17-25 ShinKamata, O-ota-ku, Tokyo, Japan
Tel) +81-3-6424-6276 (ex. 7053-8779)
Fax) +81-3-6424-6446 (ex. 7053-9081)
=====================================
Re: Need help for subversion
Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Hiroshi Miyazaki!
> According to the Subversion Wiki,
> it seem to be possible to develop hook methods.
> Therefore, I'd like to use its capability.
> When we checkin and checkout certain files into/from Subversion (through command line),
> is it possible to invoke an "hook method (exit routine)", which can add some extra
> user required function.
Hooking is only server-side, and only handle commits.
Without more information about your intentions and supposed program
architecture, it's hard to suggest anything.
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 28.01.2010, <17:21>
Sorry for my terrible english...