stack: use self._revs in stack.heads() draft
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 12 Sep 2019 14:42:38 +0700
changeset 5220 76dc63c4131c
parent 4893 d3ad50b40a4e
child 5221 34494a5ba69b
stack: use self._revs in stack.heads() No code cares about the ordering of the heads anyway, so let's use the unordered property that doesn't need to be sliced (because it doesn't include base).
hgext3rd/topic/stack.py
--- a/hgext3rd/topic/stack.py	Thu Oct 10 08:22:41 2019 +0700
+++ b/hgext3rd/topic/stack.py	Thu Sep 12 14:42:38 2019 +0700
@@ -195,9 +195,8 @@
 
     @util.propertycache
     def heads(self):
-        revs = self.revs[1:]
         deps, rdeps = self._dependencies
-        return [r for r in revs if not rdeps[r]]
+        return [r for r in self._revs if not rdeps[r]]
 
     @util.propertycache
     def behindcount(self):