##// END OF EJS Templates
exchange: use "served" repo filter to guess what the server will publish...
av6 -
r48286:f03e9d30 default
parent child Browse files
Show More
@@ -184,6 +184,10 b' def _checkpublish(pushop):'
184 published = repo.filtered(b'served').revs(b'not public()')
184 published = repo.filtered(b'served').revs(b'not public()')
185 else:
185 else:
186 published = repo.revs(b'::%ln - public()', pushop.revs)
186 published = repo.revs(b'::%ln - public()', pushop.revs)
187 # we want to use pushop.revs in the revset even if they themselves are
188 # secret, but we don't want to have anything that the server won't see
189 # in the result of this expression
190 published &= repo.filtered(b'served')
187 if published:
191 if published:
188 if behavior == b'warn':
192 if behavior == b'warn':
189 ui.warn(
193 ui.warn(
@@ -1592,6 +1592,26 b' abort behavior'
1592 (use --publish or adjust 'experimental.auto-publish' config)
1592 (use --publish or adjust 'experimental.auto-publish' config)
1593 [255]
1593 [255]
1594
1594
1595 trying to push a secret changeset doesn't confuse auto-publish
1596
1597 $ hg phase --secret --force
1598 test-debug-phase: move rev 0: 1 -> 2
1599 test-debug-phase: move rev 1: 1 -> 2
1600
1601 $ hg push --config experimental.auto-publish=abort
1602 pushing to $TESTTMP/auto-publish-orig
1603 abort: push would publish 1 changesets
1604 (use --publish or adjust 'experimental.auto-publish' config)
1605 [255]
1606 $ hg push -r . --config experimental.auto-publish=abort
1607 pushing to $TESTTMP/auto-publish-orig
1608 abort: push would publish 1 changesets
1609 (use --publish or adjust 'experimental.auto-publish' config)
1610 [255]
1611
1612 $ hg phase --draft
1613 test-debug-phase: move rev 1: 2 -> 1
1614
1595 --publish flag makes push succeed
1615 --publish flag makes push succeed
1596
1616
1597 $ hg push -r '.^' --publish --config experimental.auto-publish=abort
1617 $ hg push -r '.^' --publish --config experimental.auto-publish=abort
General Comments 0
You need to be logged in to leave comments. Login now