> -----Original Message-----
> From: Noorul Islam K M [mailto:noorul_at_collab.net]
> Sent: vrijdag 15 juli 2011 14:58
> To: Subversion
> Subject: [PATCH] Issue 3942 - Provide new subcommand on svnadmin to
> create a lock
>
> Noorul Islam K M <noorul_at_collab.net> writes:
>
> > From: http://subversion.tigris.org/issues/show_bug.cgi?id=3942
> >
> ==========================================================
> =============
> > The svnadmin command currently allows you to list and remove locks. It
> > would be useful if you could also create locks. Suggested syntax would
> > be something like:
> >
> > svnadmin lock REPOS PATH USERNAME COMMENT-FILE TOKEN
> >
> > Where COMMENT-FILE is handled similar to svnadmin setrevprop TOKEN
> would
> > be optional. If not provided a lock token would be generated.
> >
> > The reason I would like this subcommand is that it would make it
> > possible to build a system for synchronizing locks between a master and
> > slave. A post-lock hook on master could send this info to slaves and
> > they could use it to create the lock on the slaves (with the same lock
> > token). It seems like it would be possible for someone to use this
> > command to store lock information along with a dumpfile and recreate
> > them after restoring repository from a dump. That is not my goal, but I
> > think it is another possible usage.
> >
> > Buddied by: cmpilato
> >
> ==========================================================
> ==============
> >
> > I would like to work on this enhancement. If someone else is already
> > working on this please let me know.
> >
>
> As first step I implemented the following syntax.
>
> svnadmin lock REPOS PATH USERNAME COMMENT-FILE
>
> I will add the optional TOKEN argument later. I hope I am progressing in
> the right direction.
For your original usecase you really need the lock token.
If the lock token in the master and slave repository don't match you will
get reports about the lock being stolen.
The username and comment are only informational for users. The only data
that proves you have the lock to Subversion is this lock token.
(Of course hook scripts are more likely to check the username, but
Subversion and Webdav only care about the token)
Bert
Received on 2011-07-15 15:36:59 CEST