comparison 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
comparison
equal deleted inserted replaced
5931:6357551cb66f 5932:fe25ec8f0124
150 150
151 if pushop.revs is None: 151 if pushop.revs is None:
152 published = repo.filtered(b'served').revs(b'not public()') 152 published = repo.filtered(b'served').revs(b'not public()')
153 else: 153 else:
154 published = repo.revs(b'::%ln - public()', pushop.revs) 154 published = repo.revs(b'::%ln - public()', pushop.revs)
155 # we want to use pushop.revs in the revset even if they themselves are
156 # secret, but we don't want to have anything that the server won't see
157 # in the result of this expression
158 published &= repo.filtered(b'served')
159
155 if mode == b'auto': 160 if mode == b'auto':
156 published = repo.revs(b'%ld::(%ld - topic())', published, published) 161 published = repo.revs(b'%ld::(%ld - topic())', published, published)
157 if published: 162 if published:
158 if behavior == b'warn': 163 if behavior == b'warn':
159 ui.warn( 164 ui.warn(