Mercurial > evolve
diff tests/test-topic-flow-publish-bare.t @ 5935:aff365171309
branching: merge with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 25 May 2021 18:46:09 +0200 |
parents | fe25ec8f0124 |
children | 4cf020149c4a 51249e4e9025 |
line wrap: on
line diff
--- a/tests/test-topic-flow-publish-bare.t Wed Mar 03 12:40:59 2021 +0530 +++ b/tests/test-topic-flow-publish-bare.t Tue May 25 18:46:09 2021 +0200 @@ -5,6 +5,17 @@ $ . "$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}' + > EOF + Publishing of bare branch ========================= @@ -32,12 +43,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 +72,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 +101,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 +138,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 +167,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 +208,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 +251,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 +284,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,12 +345,33 @@ $ 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 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 @@ -351,7 +389,7 @@ $ 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 experimental.auto-publish=abort -r .