# HG changeset patch # User Anton Shestakov # Date 1715947174 -14400 # Node ID efbefcb197391fe694e662eb8805bda9dfd3771a # Parent afea2dd5e7b5e1e4ff0e4fad014e5f9503613669 topic: compatibility for RemotePhasesSummary.public_heads diff -r afea2dd5e7b5 -r efbefcb19739 hgext3rd/topic/discovery.py --- 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)))