diff mercurial/localrepo.py @ 18312:7331ee72f99c

localrepo: write the phasecache when destroying nodes
author Idan Kamara <idankk86@gmail.com>
date Fri, 11 Jan 2013 00:05:52 +0200
parents 084074648755
children 3e4a944c0d04
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Jan 05 16:50:12 2013 +0200
+++ b/mercurial/localrepo.py	Fri Jan 11 00:05:52 2013 +0200
@@ -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.