You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2012/01/06 21:56:29 UTC

Re: svn commit: r1228371 - in /subversion/trunk/subversion: svnadmin/main.c tests/cmdline/svnadmin_tests.py tests/cmdline/svntest/main.py

On Fri, Jan 6, 2012 at 14:50,  <cm...@apache.org> wrote:
> Author: cmpilato
> Date: Fri Jan  6 19:50:30 2012
> New Revision: 1228371
>
> URL: http://svn.apache.org/viewvc?rev=1228371&view=rev
> Log:
> Finish issue #4092 ("Add 'svnadmin unlock' subcommand which provides a
> lock token for unlock validation").

The requirement to specify a username/token seems a bit silly. If you
have access to svnadmin, then you can just 'svnadmin lslocks' and feed
that information into the command.

I would recommend simplifying the command to just require the path.
This is the *administrator* that you're talking about. The
double-checks for a username/token are a bit silly for the admin.

Cheers,
-g

Re: svn commit: r1228371 - in /subversion/trunk/subversion: svnadmin/main.c tests/cmdline/svnadmin_tests.py tests/cmdline/svntest/main.py

Posted by Greg Stein <gs...@gmail.com>.
On Jan 6, 2012 4:06 PM, "Daniel Shahaf" <da...@elego.de> wrote:
>
> Greg Stein wrote on Fri, Jan 06, 2012 at 15:56:29 -0500:
> > On Fri, Jan 6, 2012 at 14:50,  <cm...@apache.org> wrote:
> > > Author: cmpilato
> > > Date: Fri Jan  6 19:50:30 2012
> > > New Revision: 1228371
> > >
> > > URL: http://svn.apache.org/viewvc?rev=1228371&view=rev
> > > Log:
> > > Finish issue #4092 ("Add 'svnadmin unlock' subcommand which provides a
> > > lock token for unlock validation").
> >
> > The requirement to specify a username/token seems a bit silly. If you
> > have access to svnadmin, then you can just 'svnadmin lslocks' and feed
> > that information into the command.
> >
> > I would recommend simplifying the command to just require the path.
> > This is the *administrator* that you're talking about. The
> > double-checks for a username/token are a bit silly for the admin.
> >
>
> 'svnadmin rmlocks' removes the lock on PATH, unconditionally.
>
> 'svnadmin unlock PATH USER TOKEN' removes the lock on PATH if and only
> if the lock token is TOKEN.  That resolves the race condition in
>
>    $token = `svnadmin lslocks PATH`;
>    if (inspect $token):
>        system "svnadmin rmlocks PATH";

Ah! Makes great sense. Thanks!

Cheers,
-g

Re: svn commit: r1228371 - in /subversion/trunk/subversion: svnadmin/main.c tests/cmdline/svnadmin_tests.py tests/cmdline/svntest/main.py

Posted by Daniel Shahaf <da...@elego.de>.
Greg Stein wrote on Fri, Jan 06, 2012 at 15:56:29 -0500:
> On Fri, Jan 6, 2012 at 14:50,  <cm...@apache.org> wrote:
> > Author: cmpilato
> > Date: Fri Jan  6 19:50:30 2012
> > New Revision: 1228371
> >
> > URL: http://svn.apache.org/viewvc?rev=1228371&view=rev
> > Log:
> > Finish issue #4092 ("Add 'svnadmin unlock' subcommand which provides a
> > lock token for unlock validation").
> 
> The requirement to specify a username/token seems a bit silly. If you
> have access to svnadmin, then you can just 'svnadmin lslocks' and feed
> that information into the command.
> 
> I would recommend simplifying the command to just require the path.
> This is the *administrator* that you're talking about. The
> double-checks for a username/token are a bit silly for the admin.
> 

'svnadmin rmlocks' removes the lock on PATH, unconditionally.

'svnadmin unlock PATH USER TOKEN' removes the lock on PATH if and only
if the lock token is TOKEN.  That resolves the race condition in

    $token = `svnadmin lslocks PATH`;
    if (inspect $token):
        system "svnadmin rmlocks PATH";

> Cheers,
> -g