mercurial/commands.py
changeset 34074 abf91c4f9608
parent 33980 8abbae93045a
child 34083 08346a8fa65f
--- a/mercurial/commands.py	Sun Sep 03 21:17:25 2017 +0900
+++ b/mercurial/commands.py	Thu Aug 31 18:24:08 2017 +0300
@@ -1077,7 +1077,10 @@
     allheads = set(repo.heads())
     branches = []
     for tag, heads, tip, isclosed in repo.branchmap().iterbranches():
-        isactive = not isclosed and bool(set(heads) & allheads)
+        isactive = False
+        if not isclosed:
+            openheads = set(repo.branchmap().iteropen(heads))
+            isactive = bool(openheads & allheads)
         branches.append((tag, repo[tip], isactive, not isclosed))
     branches.sort(key=lambda i: (i[2], i[1].rev(), i[0], i[3]),
                   reverse=True)