Mercurial > hg
diff tests/test-phases-exchange.t @ 47492:f03e9d30258e
exchange: use "served" repo filter to guess what the server will publish
Previously, the second push in the added test would say "push would publish 2
changesets" because _checkpublish() was considering secret changesets to be
"pushable" when push command had a --rev argument.
Without --rev argument to push command, we already filter the repo properly.
Differential Revision: https://phab.mercurial-scm.org/D10948
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 03 Jul 2021 10:21:16 +0300 |
parents | 9261f6c1d39b |
children | 2cf264e9aa75 |
line wrap: on
line diff
--- a/tests/test-phases-exchange.t Thu Jul 01 18:51:18 2021 +0200 +++ b/tests/test-phases-exchange.t Sat Jul 03 10:21:16 2021 +0300 @@ -1592,6 +1592,26 @@ (use --publish or adjust 'experimental.auto-publish' config) [255] +trying to push a secret changeset doesn't confuse auto-publish + + $ hg phase --secret --force + test-debug-phase: move rev 0: 1 -> 2 + test-debug-phase: move rev 1: 1 -> 2 + + $ hg push --config experimental.auto-publish=abort + pushing to $TESTTMP/auto-publish-orig + abort: push would publish 1 changesets + (use --publish or adjust 'experimental.auto-publish' config) + [255] + $ hg push -r . --config experimental.auto-publish=abort + pushing to $TESTTMP/auto-publish-orig + abort: push would publish 1 changesets + (use --publish or adjust 'experimental.auto-publish' config) + [255] + + $ hg phase --draft + test-debug-phase: move rev 1: 2 -> 1 + --publish flag makes push succeed $ hg push -r '.^' --publish --config experimental.auto-publish=abort