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

Re: [PATCH] allow pre-lock hook to specify token for locking

From: Chia-liang Kao <clkao_at_clkao.org>
Date: Mon, 28 Jul 2008 08:41:59 -0400

Here's the updated version of the patch now that some of the parts are
committed. I've also added the notes about the generated locks must
be unique each time if the user chooses to use this feature, per the
discussion in this thread.

[[[
* subversion/libsvn_repos/fs-wrap.c
 (svn_repos_fs_lock): allow returned new_token from pre-lock hook.

* subversion/libsvn_repos/repos.h
 (svn_repos__hooks_pre_lock): now has additional returned value for token.

* subversion/libsvn_repos/hooks.c
 (run_hook_cmd2): renamed from run_hook_cmd, allow stdout of hook to be
   captured and returned.
 (run_hook_cmd): wrapper for run_hook_cmd2 to provide compatibility.
 (svn_repos__hooks_pre_lock): call run_hook_cmd2 and return the token.

* subversion/libsvn_repos/repos.c: Document the pre-lock feature for
token from stdout.

]]]

2008/7/21 Chia-liang Kao <clkao_at_clkao.org>:
> 2008/7/21 Karl Fogel <kfogel_at_red-bean.com>:
>>> This is for locking through a slave repository with pushmi, we'd use the
>>> pre-lock hook to lock the mater server and then notify svn about the token
>>> we got from the master, so they are in sync.
>>
>> In other words, the slave would be locked too, and it would be using the
>> exact same lock token as the master?
>
> Yes, because it's supposed to be in total sync that you can switch back and
> forth between master and different replicas. of course the whole lock
> database need to be sync'ed over time, but this particular hook is to make
> the lock immediately in sync when committing through the replica.
>
> 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-28 14:42:19 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.