Mercurial > evolve
changeset 6787:9638df99836f stable
topic: compatibility for RemotePhasesSummary.draft_roots
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 25 Jun 2024 17:10:03 +0400 |
parents | ae01e2b10419 |
children | 0674b56d3526 |
files | hgext3rd/topic/flow.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/flow.py Fri May 17 15:59:34 2024 +0400 +++ b/hgext3rd/topic/flow.py Tue Jun 25 17:10:03 2024 +0400 @@ -127,8 +127,13 @@ if getattr(pushop, 'publish', False): if not pushop.remotephases.publishing: unfi = pushop.repo.unfiltered() - droots = pushop.remotephases.draftroots - revset = b'%ln and (not public() or %ln::)' + if util.safehasattr(pushop.remotephases, 'draftroots'): + # hg <= 6.7 (22cc679a7312) + droots = pushop.remotephases.draftroots + revset = b'%ln and (not public() or %ln::)' + else: + droots = pushop.remotephases.draft_roots + revset = b'%ln and (not public() or %ld::)' future = list(unfi.set(revset, pushop.futureheads, droots)) pushop.outdatedphases = future