# HG changeset patch # User Pierre-Yves David # Date 2011-11-10 23:15:22 # Node ID 9ae766f2f45273a8c9fd8bb1df28be3148d7e388 # Parent a667c89e49b36906a0aa0caf5a7f2452f24d1b62 phases: set new commit in 1-phase diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1243,6 +1243,8 @@ class localrepository(repo.repository): 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: diff --git a/tests/test-fncache.t b/tests/test-fncache.t --- a/tests/test-fncache.t +++ b/tests/test-fncache.t @@ -74,6 +74,7 @@ Non store repo: .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 @@ Non fncache repo: .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 diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t --- a/tests/test-hardlinks.t +++ b/tests/test-hardlinks.t @@ -47,6 +47,7 @@ Prepare repo r1: 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 @@ Repos r1 and r2 should now contain hardl 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 @@ Create a non-inlined filelog in r3: 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 @@ r4 has hardlinks in the working dir (not 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 @@ Update back to revision 11 in r4 should 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 diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t --- a/tests/test-inherit-mode.t +++ b/tests/test-inherit-mode.t @@ -76,6 +76,7 @@ new directories are setgid 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 diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -7,4 +7,4 @@ $ hg ci -m 'first' $ hglog - 0 0 first + 0 1 first