You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Aniruddha Apte <an...@gmail.com> on 2005/06/30 08:40:47 UTC

svn lock gives different output with --force?

Hi,

I have a pre-lock hook that disallows locking if the path is already
locked and the new lock requester is different from the original
locker. In such a case, the script will print to stderr.

I am getting a difference in the output of svn lock with and without
--force as shown below.

svn lock foo.h
svn: Lock request failed: 423 Locked (http://192.168.10.25)

svn lock --force foo.h
svn: 'pre-lock' hook failed with error output:
Error: /USERS/aniruddha/src/foo.h already locked by anil.

why the difference? doesn't the pre-lock hook get executed in case 1?

many thanks
-anir

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn lock gives different output with --force?

Posted by Aniruddha Apte <an...@gmail.com>.
Got it, should have read the book better :(

This http://svnbook.red-bean.com/nightly/en/svn.advanced.locking.html#svn.advanced.locking.break-steal
explains it.

So, breaking or stealing a lock is disallowed unless the --force
option is used, in which case it is allowed always. This is level 1
checking.

Admins can put in a hook for level 2 checking. So, the hook will be
executed ONLY if --force is specified.

On 30/06/05, Aniruddha Apte <an...@gmail.com> wrote:
> Hi,
> 
> I have a pre-lock hook that disallows locking if the path is already
> locked and the new lock requester is different from the original
> locker. In such a case, the script will print to stderr.
> 
> I am getting a difference in the output of svn lock with and without
> --force as shown below.
> 
> svn lock foo.h
> svn: Lock request failed: 423 Locked (http://192.168.10.25)
> 
> svn lock --force foo.h
> svn: 'pre-lock' hook failed with error output:
> Error: /USERS/aniruddha/src/foo.h already locked by anil.
> 
> why the difference? doesn't the pre-lock hook get executed in case 1?
> 
> many thanks
> -anir
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org