diff hgext3rd/topic/topicmap.py @ 5429:e4c7d4a03de7 stable

topic: compatibility with sparse phaseroots and phasesets in 5.5 See also: https://phab.mercurial-scm.org/D8694 and its stack.
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 21 Jul 2020 11:59:28 +0800
parents a4d081923c81
children dd9dba7c1d00
line wrap: on
line diff
--- a/hgext3rd/topic/topicmap.py	Tue Jul 21 11:59:10 2020 +0800
+++ b/hgext3rd/topic/topicmap.py	Tue Jul 21 11:59:28 2020 +0800
@@ -71,11 +71,10 @@
     cl = repo.changelog
     fr = cl.filteredrevs
     getrev = compat.getgetrev(cl)
-    for roots in repo._phasecache.phaseroots[1:]:
-        for n in roots:
-            r = getrev(n)
-            if r not in fr and r < maxrev:
-                revs.add(r)
+    for n in compat.nonpublicphaseroots(repo):
+        r = getrev(n)
+        if r not in fr and r < maxrev:
+            revs.add(r)
     key = nullid
     revs = sorted(revs)
     if revs: