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

RE: SVN lock at version 1.8.3 and 1.8.4 - not working

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 27 Nov 2013 13:34:46 +0100

> -----Original Message-----
> From: Kovar, Vaclav (EOM) [mailto:Vaclav.Kovar_at_skoda-auto.cz]
> Sent: woensdag 27 november 2013 13:10
> To: users_at_subversion.apache.org
> Subject: RE: SVN lock at version 1.8.3 and 1.8.4 - not working
>
> >What output does your 'pre-lock' hook template produce?
> >My guess would be that it produces something...
>
> Hello,
> My repo hasnt any active hooks, just templates in hooks dir.
> So as first i tried to run almost empty pre-lock hook and strange is, the
batch
> file is not executed. Next step was to verify other hooks. Commit hooks
was
> started successfully, but lock hook not.
>
> Details:
> My (very simple) hook batch (for start-commit, pre-commit and post-commit
> are similar):
>
> pre-lock.bat
> <code>
> echo off

If your script really has 'echo off' and not '@echo off' then your script
produces output. And you should check the documentation on how that is
handled for the specific hooks. For pre-lock this has side effects:
[[
# If the hook program outputs anything on stdout, the output string will
# be used as the lock token for this lock operation. If you choose to use
# this feature, you must guarantee the tokens generated are unique across
# the repository each time.
]]

>
> echo begin pre-lock >>
> C:\software\svnroot\repos\test001\hooks\tracefile.txt
> echo SVN_REPOS %1 >>
> C:\software\svnroot\repos\test001\hooks\tracefile.txt
> echo SVN_PATH %2 >>
> C:\software\svnroot\repos\test001\hooks\tracefile.txt
> echo SVN_USER %3 >>
> C:\software\svnroot\repos\test001\hooks\tracefile.txt
> echo end pre-lock >> C:\software\svnroot\repos\test001\hooks\tracefile.txt
> </code>
>
> And tracefile.txt:
>
> begin start-commit
> REPOS C:\software\svnroot\repos\test001
> USER iras24
> end start-commit
> begin pre-commit
> REPOS C:\software\svnroot\repos\test001
> TXN 4-5
> end pre-commit
> begin post-commit
> REPOS C:\software\svnroot\repos\test001
> REV 5
> TXN_NAME 4-5
> end post-commit
>
> Eq, no lock hook is executed.
>
> Please, any recommendations?

What operation did you perform to test the lock hook?

svn lock <something>?

The lock script is invoked as part of committing.

        Bert
Received on 2013-11-27 13:35:34 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.