RFC: Fix for issue 1827
Sune Foldager
cryo at cyanite.org
Mon Feb 15 16:16:49 CST 2010
On 15-02-2010 23:07, Sune Foldager wrote:
> + wl, wlock = wlock, None
> + wl.release()
Actually, a problem is if you press ctrl+c between those lines.
Unfortunately, wlock's can just be released more than once without
potential bad effects (if they are recursively held).
A solution could be moving the hook-invoke code down in the finally or
underneath it (with a condition, if necessary, to only invoke it when
appropriate).
Another possibility is to wrap the try-finally code in a function, so
the hook can be invoked just after it returns. Even more annoying :-p.
/Sune
More information about the Mercurial-devel
mailing list