[PATCH 04 of 10 v2] localrepo: write the phasecache when destroying nodes
Idan Kamara
idankk86 at gmail.com
Thu Jan 10 16:10:51 CST 2013
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1357855552 -7200
# Node ID d995557a854b835d65b3cde1d4ca5eaa2666471e
# Parent f995192c3e645becb51669cbad6e543f1f876199
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
@@ -1396,6 +1396,12 @@
# revisions missing because the cache is out-of-date.
branchmap.updatecache(self)
+ # 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()
+
@unfilteredmethod
def destroyed(self, newheadnodes=None):
'''Inform the repository that nodes have been destroyed.
More information about the Mercurial-devel
mailing list