phases: write default phase data as soon as possible. stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 30 Jan 2012 17:33:09 +0100
branchstable
changeset 16025 6697498bdd83
parent 16024 7c967c4a6144
child 16026 31c02546e6de
phases: write default phase data as soon as possible. Marks phase data as dirty when computing default phase. Actual writing is done when the lock is released. So, read only operation don't write phase data because they don't lock the repo.
mercurial/phases.py
tests/test-inherit-mode.t
--- a/mercurial/phases.py	Mon Jan 30 18:06:57 2012 +0100
+++ b/mercurial/phases.py	Mon Jan 30 17:33:09 2012 +0100
@@ -122,6 +122,7 @@
             raise
         for f in repo._phasedefaults:
             roots = f(repo, roots)
+        repo._dirtyphases = True
     return roots
 
 def writeroots(repo):
--- a/tests/test-inherit-mode.t	Mon Jan 30 18:06:57 2012 +0100
+++ b/tests/test-inherit-mode.t	Mon Jan 30 17:33:09 2012 +0100
@@ -121,6 +121,7 @@
   00660 ../push/.hg/store/data/dir/bar.i
   00660 ../push/.hg/store/data/foo.i
   00660 ../push/.hg/store/fncache
+  00660 ../push/.hg/store/phaseroots
   00660 ../push/.hg/store/undo
   00660 ../push/.hg/store/undo.phaseroots
   00660 ../push/.hg/undo.bookmarks