RE: svn (un)lock commands succeed when pre-(un)lock hooks fail on svn 1.9
From: <bert_at_qqmail.nl>
Date: Sun, 23 Aug 2015 02:22:50 +0200
Can you confirm that the file is locked after the command? (E.g. by running svn status on the target)
Does it lock the file when the hook blocks it… or does ‘svn lock’ return success?
At the api level the lock command performs a callback per target to return the failure/success of each target, and it is not clear which part you call succeeded?
The number of regression test of this operation was increased significantly for 1.9, as the behavior was made more consistent over the different ra layers and atomicity was improved.
Bert
From: Gustavo Chaves
Hi there,
It seems that svn 1.9 changed the behaviour of the "svn lock" and the "svn unlock" commands with regards to the fate of the corresponding pre-lock/pre-unlock hooks.
Up to svn 1.8, when those hooks failed (exit code != 0) the commands (svn lock/unlock) failed too.
Now, on svn 1.9, the commands always succeed.
To reproduce you can execute the atached script, which creates a temporary directory, cd to it, creates a repository and a working copy, commits a file and then tries to lock the file, before and after installing a hook that always fail. With svn 1.8 in you path the results would be like this:
$ ./repro-lock.sh
Now, with svn 1.9 in your path the results are like this:
$ ./repro-lock.sh
The problem was reported to me by the Debian maintainers of my SVN::Hooks Perl module at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795756.
-- Gustavo.Received on 2015-08-23 02:23:10 CEST |
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.