# HG changeset patch # User Anton Shestakov # Date 1715947174 -14400 # Node ID ae01e2b10419afd5ee9c2c5b02e233a1d488ce32 # Parent cf1e854f50e9427e6b8fdb14a59cb38eda70395c topic: compatibility for RemotePhasesSummary.public_heads diff --git a/hgext3rd/topic/discovery.py b/hgext3rd/topic/discovery.py --- a/hgext3rd/topic/discovery.py +++ b/hgext3rd/topic/discovery.py @@ -89,9 +89,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)))