You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Gardiner Myers <jg...@proofpoint.com> on 2008/12/02 19:03:06 UTC
[PATCH] hook script to require 1.5 client
[[[
Add contributed hook script that restricts commits to clients that have
mergeinfo capability.
]]]
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=804040
Re: [PATCH] hook script to require 1.5 client
Posted by Julian Foad <ju...@btopenworld.com>.
On Tue, 2009-01-06 at 09:31 -0800, John Gardiner Myers wrote:
> It has been a month since I submitted this patch. It has not been
> committed and I have received no feedback.
>
> This functionality is mentioned in the Subversion book, so I would think
> it would be generally useful. I was certainly surprised at having to
> write it myself.
Sorry, John. Sometimes you do have to give us a prod to get something
like this committed.
It looks fine to me, so I've committed it now in r35080.
Would you be happy for it to have the same licence as Subversion, as
most of the other contributed hook scripts do? If so, we should add a
comment in it saying so.
Thank you very much for the contribution.
- Julian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1011866
Re: [PATCH] hook script to require 1.5 client
Posted by John Gardiner Myers <jg...@proofpoint.com>.
It has been a month since I submitted this patch. It has not been
committed and I have received no feedback.
This functionality is mentioned in the Subversion book, so I would think
it would be generally useful. I was certainly surprised at having to
write it myself.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1008066
Re: [PATCH] hook script to require 1.5 client
Posted by John Gardiner Myers <jg...@proofpoint.com>.
Daniel Shahaf wrote:
> I don't see any script attachment.
>
It had one when I sent it out. I'll attach it inline:
Index: contrib/hook-scripts/require-mergeinfo.pl
===================================================================
--- contrib/hook-scripts/require-mergeinfo.pl (revision 0)
+++ contrib/hook-scripts/require-mergeinfo.pl (revision 0)
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+# require-mergeinfo.pl: check that the committing client supports the
+# mergeinfo capability
+#
+# Usage: require-mergeinfo.pl CAPABILITIES
+#
+# To enable, add the following line to the repository's start-commit hook:
+#
+# require-mergeinfo.pl "$3" || exit 1
+#
+
+exit 0 if grep { $_ eq 'mergeinfo' } split ':', $ARGV[0];
+print STDERR "Your client is too old to commit to this repository.\n";
+print STDERR "A version 1.5 or later client is required.\n";
+exit 1;
Property changes on: contrib/hook-scripts/require-mergeinfo.pl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=961109
Re: [PATCH] hook script to require 1.5 client
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
I don't see any script attachment.
John Gardiner Myers wrote on Tue, 2 Dec 2008 at 11:03 -0800:
> [[[
> Add contributed hook script that restricts commits to clients that have
> mergeinfo capability.
> ]]]
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=804040
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=912493