Commit 4a328d3e authored by Anton Shestakov's avatar Anton Shestakov
Browse files

topic: use "served" repo filter to guess what the server will publish

--HG--
branch : stable
parent 6357551cb66f
......@@ -152,6 +152,11 @@ def replacecheckpublish(orig, pushop):
published = repo.filtered(b'served').revs(b'not public()')
else:
published = repo.revs(b'::%ln - public()', pushop.revs)
# we want to use pushop.revs in the revset even if they themselves are
# secret, but we don't want to have anything that the server won't see
# in the result of this expression
published &= repo.filtered(b'served')
if mode == b'auto':
published = repo.revs(b'%ld::(%ld - topic())', published, published)
if published:
......
......@@ -365,6 +365,13 @@ Making sure the topic-publishing mode is announced as a capability
Trying to push changeset without topic (would publish them)
$ mkcommit c_aM0
$ 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment