[PATCH 04 of 12] localrepo: write the phasecache when destroying nodes
Pierre-Yves David
pierre-yves.david at logilab.fr
Tue Jan 8 17:50:50 UTC 2013
On Mon, Dec 17, 2012 at 05:35:29PM +0200, Idan Kamara wrote:
> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1355595359 -7200
> # Branch stable
> # Node ID aa6a85e47fb4edc705959da93fb024aef56dafd4
> # Parent bb150967c8d0ee6fd3b43fd9d9470f90bbb10b9d
> localrepo: write the phasecache when destroying nodes
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -1492,6 +1492,12 @@
> # revisions missing because the cache is out-of-date.
> self.updatebranchcache()
>
> + # When using the same lock to commit and strip, the phasecache is left
> + # dirty after committing. Then when we strip the repo is invalidated,
> + # causing those changes to disappear.
> + if '_phasecache' in vars(self):
> + self._phasecache.write()
> +
This assumes that every changes before destroying have been commited. This is
probably true but highlight the poor shape of our transaction mechanism for
non-changeset changes. :-(
Can you add a test that validate that highligh the fixed behavior here ?
--
Pierre-Yves David
http://www.logilab.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20130108/e5331940/attachment.asc>
More information about the Mercurial-devel
mailing list