diff hgext3rd/topic/flow.py @ 5932:fe25ec8f0124 stable

topic: use "served" repo filter to guess what the server will publish
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 24 May 2021 15:14:30 +0800
parents 8431bb224862
children 57f9cdbf6a99
line wrap: on
line diff
--- a/hgext3rd/topic/flow.py	Mon May 24 14:26:42 2021 +0800
+++ b/hgext3rd/topic/flow.py	Mon May 24 15:14:30 2021 +0800
@@ -152,6 +152,11 @@
         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: