Mercurial > hg
diff tests/test-subrepo.t @ 20306:fe8e254c7ad6 stable
merge default into stable for 2.9 code freeze
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 21 Jan 2014 14:30:06 -0600 |
parents | 6545770bd379 |
children | 03774a2b6991 |
line wrap: on
line diff
--- a/tests/test-subrepo.t Wed Jan 01 21:46:45 2014 -0600 +++ b/tests/test-subrepo.t Tue Jan 21 14:30:06 2014 -0600 @@ -468,12 +468,8 @@ KeyError $ hg backout ".^" - reverting .hgsubstate - reverting subrepo s - reverting s/a (glob) - reverting subrepo ss - reverting subrepo t 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + changeset c373c8102e68 backed out, don't forget to commit. $ hg up -C # discard changes 1 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -1232,4 +1228,69 @@ searching for changes no changes found [1] + $ cd .. +Test phase choice for newly created commit with "phases.subrepochecks" +configuration + + $ cd t + $ hg update -q -r 12 + + $ cat >> s/ss/.hg/hgrc <<EOF + > [phases] + > new-commit = secret + > EOF + $ cat >> s/.hg/hgrc <<EOF + > [phases] + > new-commit = draft + > EOF + $ echo phasecheck1 >> s/ss/a + $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 + committing subrepository ss + transaction abort! + rollback completed + abort: can't commit in draft phase conflicting secret from subrepository ss + [255] + $ echo phasecheck2 >> s/ss/a + $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 + committing subrepository ss + $ hg -R s/ss phase tip + 3: secret + $ hg -R s phase tip + 6: draft + $ echo phasecheck3 >> s/ss/a + $ hg -R s commit -S -m phasecheck3 + committing subrepository ss + warning: changes are committed in secret phase from subrepository ss + $ hg -R s/ss phase tip + 4: secret + $ hg -R s phase tip + 7: secret + + $ cat >> t/.hg/hgrc <<EOF + > [phases] + > new-commit = draft + > EOF + $ cat >> .hg/hgrc <<EOF + > [phases] + > new-commit = public + > EOF + $ echo phasecheck4 >> s/ss/a + $ echo phasecheck4 >> t/t + $ hg commit -S -m phasecheck4 + committing subrepository s + committing subrepository s/ss + warning: changes are committed in secret phase from subrepository ss + committing subrepository t + warning: changes are committed in secret phase from subrepository s + created new head + $ hg -R s/ss phase tip + 5: secret + $ hg -R s phase tip + 8: secret + $ hg -R t phase tip + 6: draft + $ hg phase tip + 15: secret + + $ cd ..