[PATCH 1 of 4 V3] dirstate: add begin/endparentchange to dirstate
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Sep 11 08:08:33 CDT 2014
On 09/09/2014 10:21 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1409942069 25200
> # Fri Sep 05 11:34:29 2014 -0700
> # Node ID b647743bc6fb059c05c2e075b2d71d4bdb2654cf
> # Parent 897041f6b025778193c6da5b9795da09a91c866e
> dirstate: add begin/endparentchange to dirstate
>
> It's possible for the dirstate to become incoherent (issue4353) if there is an
> exception in the middle of the dirstate parent and entries being written (like
> if the user ctrl+c's). This change adds begin/endparentchange which a future
> patch will require to be set before changing the dirstate parent. This will
> allow us to prevent writing the dirstate in the event of an exception while
> changing the parent.
This series was bugging me because it linked the dirstate change to the
lock. Linking such related concept to the lock seems like a mistake.
However reading it again, I realize that the dirstate writing is
-already- attached to the lock and this series just makes is sightly
less awful. So +1
We should aims to detach dirstate from the lock at some point.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list