changeset 15483:9ae766f2f452

phases: set new commit in 1-phase
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 11 Nov 2011 00:15:22 +0100
parents a667c89e49b3
children a44446ff9ad8
files mercurial/localrepo.py tests/test-fncache.t tests/test-hardlinks.t tests/test-inherit-mode.t tests/test-phases.t
diffstat 5 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Nov 11 00:16:53 2011 +0100
+++ b/mercurial/localrepo.py	Fri Nov 11 00:15:22 2011 +0100
@@ -1243,6 +1243,8 @@
             self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1,
                       parent2=xp2, pending=p)
             self.changelog.finalize(trp)
+            # ensure the new commit is 1-phase
+            phases.retractboundary(self, 1, [n])
             tr.close()
 
             if self._branchcache:
--- a/tests/test-fncache.t	Fri Nov 11 00:16:53 2011 +0100
+++ b/tests/test-fncache.t	Fri Nov 11 00:15:22 2011 +0100
@@ -74,6 +74,7 @@
   .hg/data/tst.d.hg/foo.i
   .hg/dirstate
   .hg/last-message.txt
+  .hg/phaseroots
   .hg/requires
   .hg/undo
   .hg/undo.bookmarks
@@ -103,6 +104,7 @@
   .hg/store/data
   .hg/store/data/tst.d.hg
   .hg/store/data/tst.d.hg/_foo.i
+  .hg/store/phaseroots
   .hg/store/undo
   .hg/store/undo.phaseroots
   .hg/undo.bookmarks
--- a/tests/test-hardlinks.t	Fri Nov 11 00:16:53 2011 +0100
+++ b/tests/test-hardlinks.t	Fri Nov 11 00:15:22 2011 +0100
@@ -47,6 +47,7 @@
   1 r1/.hg/store/data/d1/f2.i
   1 r1/.hg/store/data/f1.i
   1 r1/.hg/store/fncache
+  1 r1/.hg/store/phaseroots
   1 r1/.hg/store/undo
   1 r1/.hg/store/undo.phaseroots
 
@@ -76,6 +77,7 @@
   2 r1/.hg/store/data/d1/f2.i
   2 r1/.hg/store/data/f1.i
   2 r1/.hg/store/fncache
+  1 r1/.hg/store/phaseroots
   1 r1/.hg/store/undo
   1 r1/.hg/store/undo.phaseroots
 
@@ -115,6 +117,7 @@
   1 r3/.hg/store/data/d1/f2.i
   1 r3/.hg/store/data/f1.i
   1 r3/.hg/store/fncache
+  1 r3/.hg/store/phaseroots
   1 r3/.hg/store/undo
   1 r3/.hg/store/undo.phaseroots
 
@@ -199,6 +202,7 @@
   2 r4/.hg/store/data/d1/f2.i
   2 r4/.hg/store/data/f1.i
   2 r4/.hg/store/fncache
+  2 r4/.hg/store/phaseroots
   2 r4/.hg/store/undo
   2 r4/.hg/store/undo.phaseroots
   2 r4/.hg/undo.bookmarks
@@ -229,6 +233,7 @@
   2 r4/.hg/store/data/d1/f2.i
   2 r4/.hg/store/data/f1.i
   2 r4/.hg/store/fncache
+  2 r4/.hg/store/phaseroots
   2 r4/.hg/store/undo
   2 r4/.hg/store/undo.phaseroots
   2 r4/.hg/undo.bookmarks
--- a/tests/test-inherit-mode.t	Fri Nov 11 00:16:53 2011 +0100
+++ b/tests/test-inherit-mode.t	Fri Nov 11 00:15:22 2011 +0100
@@ -76,6 +76,7 @@
   00660 ./.hg/store/data/dir/bar.i
   00660 ./.hg/store/data/foo.i
   00660 ./.hg/store/fncache
+  00660 ./.hg/store/phaseroots
   00660 ./.hg/store/undo
   00660 ./.hg/store/undo.phaseroots
   00660 ./.hg/undo.bookmarks
--- a/tests/test-phases.t	Fri Nov 11 00:16:53 2011 +0100
+++ b/tests/test-phases.t	Fri Nov 11 00:15:22 2011 +0100
@@ -7,4 +7,4 @@
   $ hg ci -m 'first'
 
   $ hglog
-  0 0 first
+  0 1 first