Commit b1c42b0e authored by Anton Shestakov's avatar Anton Shestakov
Browse files

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

--HG--
branch : stable
parent fe25ec8f0124
Pipeline #22291 passed with stage
in 4 minutes and 43 seconds
......@@ -38,6 +38,10 @@ if b'auto-publish' not in configitems.coreitems.get(b'experimental', {}):
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 published:
if behavior == b'warn':
ui.warn(_(b'%i changesets about to be published\n')
......
......@@ -60,7 +60,7 @@ Test options to prevent implicite publishing of changesets
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd strict-publish-client
$ echo c > c
$ hg ci -qAm C c
$ hg ci -qAm C c --secret
abort behavior
......@@ -70,6 +70,17 @@ abort behavior
> eof
$ hg push -r .
pushing to $TESTTMP/source
searching for changes
no changes found (ignored 1 secret changesets)
[1]
$ hg push
pushing to $TESTTMP/source
searching for changes
no changes found (ignored 1 secret changesets)
[1]
$ hg phase --draft
$ hg push -r .
pushing to $TESTTMP/source
abort: push would publish 1 changesets
(* 'experimental.auto-publish' config) (glob)
[255]
......
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