You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Oliver Specht <ko...@oliverspecht.de> on 2010/03/03 15:09:28 UTC
Check Client Version in hook
Hi,
I want to check the client version in a commit hook. Can I do that? I
saw that there are only two parameters in the script template.
Is there any documentation about all the parameters a hook script gets?
Thanks,
Oliver
RE: Check Client Version in hook
Posted by Geoff Rowell <ge...@gmail.com>.
Philipp Leusmann <ph...@rwth-aachen.de> wrote on Wednesday, March
03, 2010 11:41 AM:
> Great, information if mergeinfo is available if all we need to do. (We
want to make sure only mergeinfo-supporting > clients are allowed, as
proposed in
<http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html>
>
> Maybe the way to do so (as shown in
<http://www.svnforum.org/2017/viewtopic.php?t=6527> ) should also make it
into > the book.
>
This is also provided by the "FilterCapabilities" tag of the Subversion Hook
Framework.
http://sourceforge.net/apps/mediawiki/svnhook
There's an example under "Hook Configuration File Examples".
---
Geoff Rowell
geoff.rowell@gmail.com
Re: Check Client Version in hook
Posted by Stein Somers <ss...@opnet.com>.
Just be aware that these hooks disallow all commits, not just commits of
merges, where the svnbook advice applies. There's not much better you
can do, because it's impossible to tell from an "old" transaction if it
contains a merge or only genuine, original changes.
If you'd still like to allow old clients to commit particular kinds of
changes (like tagging), or in particular branches, it's not that easy.
--
Stein
Re: Check Client Version in hook
Posted by Philipp Leusmann <ph...@rwth-aachen.de>.
Great, information if mergeinfo is available if all we need to do. (We want to make sure only mergeinfo-supporting clients are allowed, as proposed in <http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html>
Maybe the way to do so (as shown in <http://www.svnforum.org/2017/viewtopic.php?t=6527> ) should also make it into the book.
Regards,
Philipp
Am 03.03.2010 um 16:18 schrieb Ryan Schmidt:
>
> On Mar 3, 2010, at 09:09, Oliver Specht wrote:
>
>> I want to check the client version in a commit hook. Can I do that? I saw that there are only two parameters in the script template.
>>
>> Is there any documentation about all the parameters a hook script gets?
>
> There is no way to check the version of the client. You can check the capabilities of the client in a limited way, which you can use to know for example whether the client has merge tracking support or not.
>
>
Re: Check Client Version in hook
Posted by Stein Somers <ss...@opnet.com>.
On 03/03/2010 16:18, Ryan Schmidt wrote:
> You can check the capabilities of the client in a limited way
Limited indeed, as far as I understand. You get the client information
in the start-commit hook. If you want to correlate it with the contents
of the transaction proposed, you have to be in the pre-commit hook, and
how can you get to that client information then? Your start-commit must
have saved it to file? Assuming that once a start-commit is launched, no
other transaction can be started.
--
Stein
Re: Check Client Version in hook
Posted by Oliver Specht <ko...@oliverspecht.de>.
Ryan Schmidt schrieb:
> On Mar 3, 2010, at 09:29, Oliver Specht wrote:
>
>> Ryan Schmidt schrieb:
>>> On Mar 3, 2010, at 09:09, Oliver Specht wrote:
>>>> I want to check the client version in a commit hook. Can I do that? I saw that there are only two parameters in the script template.
>>>>
>>>> Is there any documentation about all the parameters a hook script gets?
>>> There is no way to check the version of the client. You can check the capabilities of the client in a limited way, which you can use to know for example whether the client has merge tracking support or not.
>> Hi,
>> thanks for the quick response. How do I check the merge tracking support? This is exactly what I am trying to do...
>
>
> Check this thread:
>
> http://www.svnforum.org/2017/viewtopic.php?t=6527
>
> Don't forget to Reply All so this discussion stays on the mailing list.
All right, I will check the link.
Thanks for your help,
Oliver
Re: Check Client Version in hook
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2010, at 09:29, Oliver Specht wrote:
> Ryan Schmidt schrieb:
>> On Mar 3, 2010, at 09:09, Oliver Specht wrote:
>>> I want to check the client version in a commit hook. Can I do that? I saw that there are only two parameters in the script template.
>>>
>>> Is there any documentation about all the parameters a hook script gets?
>> There is no way to check the version of the client. You can check the capabilities of the client in a limited way, which you can use to know for example whether the client has merge tracking support or not.
>
> Hi,
> thanks for the quick response. How do I check the merge tracking support? This is exactly what I am trying to do...
Check this thread:
http://www.svnforum.org/2017/viewtopic.php?t=6527
Don't forget to Reply All so this discussion stays on the mailing list.
Re: Check Client Version in hook
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 3, 2010, at 09:09, Oliver Specht wrote:
> I want to check the client version in a commit hook. Can I do that? I saw that there are only two parameters in the script template.
>
> Is there any documentation about all the parameters a hook script gets?
There is no way to check the version of the client. You can check the capabilities of the client in a limited way, which you can use to know for example whether the client has merge tracking support or not.