mercurial/localrepo.py
changeset 15454 5a7dde5adec8
parent 15420 e80d0d3198f0
child 15455 c6f87bdab2a1
--- a/mercurial/localrepo.py	Mon Nov 07 18:37:58 2011 +0100
+++ b/mercurial/localrepo.py	Mon Nov 07 14:11:01 2011 +0100
@@ -36,6 +36,7 @@
         self.wopener = scmutil.opener(self.root)
         self.baseui = baseui
         self.ui = baseui.copy()
+        self._dirtyphases = False
 
         try:
             self.ui.readconfig(self.join("hgrc"), self.root)
@@ -172,6 +173,7 @@
 
     @filecache('phaseroots')
     def _phaseroots(self):
+        self._dirtyphases = False
         return phases.readroots(self)
 
     @propertycache
@@ -910,6 +912,8 @@
 
         def unlock():
             self.store.write()
+            if self._dirtyphases:
+                phases.writeroots(self)
             for k, ce in self._filecache.items():
                 if k == 'dirstate':
                     continue