Mercurial > evolve
diff tests/test-topic-flow-publish-bare.t @ 5947:4cf020149c4a mercurial-4.8
test-compat: merge mercurial-4.9 into mercurial-4.8
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 28 May 2021 00:12:32 +0800 |
parents | 1bb465fad209 fe25ec8f0124 |
children | 6b67f26f4667 |
line wrap: on
line diff
--- a/tests/test-topic-flow-publish-bare.t Sun Apr 25 13:18:03 2021 +0800 +++ b/tests/test-topic-flow-publish-bare.t Fri May 28 00:12:32 2021 +0800 @@ -5,6 +5,20 @@ $ . "$TESTDIR/testlib/topic_setup.sh" $ . "$TESTDIR/testlib/common.sh" +Also testing auto-publish config option with this publishing mode + + $ cat << EOF >> "$HGRCPATH" + > [ui] + > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" + > [experimental] + > auto-publish = warn + > [alias] + > tgl = log --rev 'sort(\$1, "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + > [extensions] + > # needed for experimental.auto-publish in hg <= 4.8 + > evolve = + > EOF + Publishing of bare branch ========================= @@ -32,12 +46,13 @@ $ mkcommit c_dB0 $ hg push pushing to $TESTTMP/bare-branch-server + 1 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 2:286d02a6e2a2 c_dB0 public default | o 1:134bc3852ad2 c_dA0 public default @@ -60,12 +75,13 @@ (consider using topic for lightweight branches. See 'hg help topic') $ hg push -f pushing to $TESTTMP/bare-branch-server + 2 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+2 heads) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 4:9bf953aa81f6 c_dD0 public default | | o 3:9d5b8e1f08a4 c_dC0 public default @@ -88,12 +104,13 @@ $ mkcommit c_aE0 $ hg push --new-branch pushing to $TESTTMP/bare-branch-server + 1 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 5:0db08e758601 c_aE0 public branchA | | o 4:9bf953aa81f6 c_dD0 public default @@ -124,7 +141,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 6:0867c4471796 c_dF0 draft default foo | o 4:9bf953aa81f6 c_dD0 public default @@ -153,12 +170,13 @@ (see 'hg help topics' for more information) $ hg push pushing to $TESTTMP/bare-branch-server + 1 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 8:858be9a8daaf c_dH0 draft default bar | o 7:0e4041d324d0 c_dG0 public default @@ -193,12 +211,13 @@ $ mkcommit c_aK0 $ hg push pushing to $TESTTMP/bare-branch-server + 2 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 3 changesets with 3 changes to 3 files - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 11:b0a00ebdfd24 c_aK0 public branchA | o 5:0db08e758601 c_aE0 public branchA @@ -235,12 +254,13 @@ $ hg ci -m 'c_dL0' $ hg push pushing to $TESTTMP/bare-branch-server + 2 changesets about to be published searching for changes adding changesets adding manifests adding file changes added 1 changesets with 0 changes to 0 files (-1 heads) - $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' @ 12:a6f9f8c6c6cc c_dL0 public default |\ | o 9:4b5570d89f0f c_dI0 public default @@ -267,7 +287,7 @@ |/ o 0:ea207398892e ROOT public default - $ hg log -R ../bare-branch-server --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' + $ hg tgl 'all()' -R ../bare-branch-server o 12:a6f9f8c6c6cc c_dL0 public default |\ | o 9:4b5570d89f0f c_dI0 public default @@ -328,18 +348,39 @@ $ hg up branchA 2 files updated, 0 files merged, 5 files removed, 0 files unresolved +Making sure the topic-publishing mode is announced as a capability + + $ hg debugcapabilities $TESTTMP/bare-branch-server | grep topics + ext-topics-publish=auto + topics + $ hg debugcapabilities ssh://user@dummy/bare-branch-server | grep topics + _exttopics_heads + ext-topics-publish=auto + topics + $ hg serve -R ../bare-branch-server -p $HGPORT -d --pid-file hg.pid + $ cat hg.pid >> $DAEMON_PIDS + $ hg debugcapabilities http://localhost:$HGPORT | grep topics + _exttopics_heads + ext-topics-publish=auto + topics + $ killdaemons.py + Trying to push changeset without topic (would publish them) $ mkcommit c_aM0 - $ hg debugcapabilities $TESTTMP/bare-branch-server | grep topics - ext-topics-publish=auto - topics - $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . + $ hg phase --secret --force + $ hg push --config experimental.auto-publish=abort -r . + pushing to $TESTTMP/bare-branch-server + searching for changes + no changes found (ignored 1 secret changesets) + [1] + $ hg phase --draft + $ hg push --config experimental.auto-publish=abort -r . pushing to $TESTTMP/bare-branch-server abort: push would publish 1 changesets (use --publish or adjust 'experimental.auto-publish' config) [255] - $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . --publish + $ hg push --config experimental.auto-publish=abort -r . --publish pushing to $TESTTMP/bare-branch-server searching for changes adding changesets @@ -351,10 +392,10 @@ $ hg topic test-push-protection marked working directory as topic: test-push-protection - $ mkcommit c_aL0 + $ mkcommit c_aN0 active topic 'test-push-protection' grew its first changeset (see 'hg help topics' for more information) - $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . + $ hg push --config experimental.auto-publish=abort -r . pushing to $TESTTMP/bare-branch-server searching for changes adding changesets