[PATCH 04 of 12] localrepo: write the phasecache when destroying nodes

Idan Kamara idankk86 at gmail.com
Mon Dec 17 09:35:29 CST 2012


# 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()
+
     def destroyed(self, newheadnodes=None):
         '''Inform the repository that nodes have been destroyed.
         Intended for use by strip and rollback, so there's a common


More information about the Mercurial-devel mailing list