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.
--- 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