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

Re: unlock hook completeness?

From: Chia-liang Kao <clkao_at_clkao.org>
Date: Tue, 15 Jul 2008 20:40:28 +0000 (UTC)

Karl Fogel <kfogel <at> red-bean.com> writes:
> > I just noticed that the unlock hook is not taking everything the api
> > does, notably lacking the lock token and the break-lock flag. Is
> > there any reason for that? I'd be happy to provide a patch passing
> > them along to the hook.
>
> Hunh. I don't know. Oversight? If you have a use case, a patch makes
> sense...

yes i do have a use case. ;) to get locks synchronized less painfully.

> > I am also wondering if we have any policies on hook interface
> > versioning? luckily this change should be backward-compatible as we
> > are just adding more arguments in this case.
>
> I think that's our policy -- you can add args, just don't lose or change
> existing args.

Here's my proposed change (as in the hook templates). I was a bit unsure about
having comment passed in as argument or stdin though. If this looks reasonable
then I will put a patch together.

--- subversion/libsvn_repos/repos.c (revision 32132)
+++ subversion/libsvn_repos/repos.c (local)
@@ -537,6 +537,8 @@ PREWRITTEN_HOOKS_TEXT
 "# [1] REPOS-PATH (the path to this repository)" NL
 "# [2] PATH (the path in the repository about to be locked)" NL
 "# [3] USER (the user creating the lock)" NL
+"# [4] COMMENT (the comment of the lock)" NL
+"# [5] STEAL-LOCK (if the user is trying to steal the lock)" NL
 "#" NL
 "# The default working directory for the invocation is undefined, so" NL
 "# the program should set one explicitly if it cares." NL
@@ -618,6 +620,8 @@ PREWRITTEN_HOOKS_TEXT
 "# [1] REPOS-PATH (the path to this repository)" NL
 "# [2] PATH (the path in the repository about to be unlocked)" NL
 "# [3] USER (the user destroying the lock)" NL
+"# [4] TOKEN (the lock token to be destoryed)" NL
+"# [5] BREAK-UNLOCK (if the user is breaking the lock)" NL
 "#" NL
 "# The default working directory for the invocation is undefined, so" NL
 "# the program should set one explicitly if it cares." NL

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-15 22:40:53 CEST

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.