Mercurial > evolve
changeset 6780:efbefcb19739
topic: compatibility for RemotePhasesSummary.public_heads
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 17 May 2024 15:59:34 +0400 |
parents | afea2dd5e7b5 |
children | 79c50e9635e1 |
files | hgext3rd/topic/discovery.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py Fri May 17 15:07:04 2024 +0400 +++ b/hgext3rd/topic/discovery.py Fri May 17 15:59:34 2024 +0400 @@ -88,9 +88,11 @@ else: origremotebranchmap = remote.branchmap publishednode = [c.node() for c in pushop.outdatedphases] - publishedset = repo.revs(b'ancestors(%ln + %ln)', - publishednode, - pushop.remotephases.publicheads) + if util.safehasattr(pushop.remotephases, 'publicheads'): + # hg <= 6.7 (22cc679a7312) + publishedset = repo.revs(b'ancestors(%ln + %ln)', publishednode, pushop.remotephases.publicheads) + else: + publishedset = repo.revs(b'ancestors(%ln + %ld)', publishednode, pushop.remotephases.public_heads) publishing = (b'phases' not in remote.listkeys(b'namespaces') or bool(remote.listkeys(b'phases').get(b'publishing', False)))