On 10/16/2016 04:03 PM, Simon Farnsworth wrote:
On 16/10/2016 12:43, Pierre-Yves David wrote:

On 10/08/2016 05:18 PM, Simon Farnsworth wrote:
# HG changeset patch
# User Simon Farnsworth <simon...@fb.com>
# Date 1475939634 25200
#      Sat Oct 08 08:13:54 2016 -0700
# Node ID 8a0c9c0158b3e9574a4571af3dce9978844b825d
# Parent  ee284d7c5faa5d9f17853f51c17883844b985c58
evolve: lock the working copy early in next and prev (issue5244)

Both next and prev depend on a consistent working copy, but were
waiting to
take the lock until they were ready to alter the working copy.

Take the lock before reading the working copy state, and do not
release it
until we're definitely not going to change the working copy.

The fix approach seems good, but the implementation is a bit strangeto
me. See inline.

I can remove the early unlocks, but the goal is to unlock early when we
no longer need the locks.

It does not seems like much is actually happening between the lock release and the end of the commands. Unless I'm missing something, I think we can just unlock at the end.

Pierre-Yves David
Mercurial-devel mailing list

Reply via email to