stack: use self._revs in stack.behindcount() draft
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 12 Sep 2019 14:44:19 +0700
changeset 5221 34494a5ba69b
parent 5220 76dc63c4131c
child 5222 13ca3810a105
stack: use self._revs in stack.behindcount() This code also doesn't care about the order of revisions, it just wants all revs except stack base, and that's what self._revs is.
hgext3rd/topic/stack.py
--- a/hgext3rd/topic/stack.py	Thu Sep 12 14:42:38 2019 +0700
+++ b/hgext3rd/topic/stack.py	Thu Sep 12 14:44:19 2019 +0700
@@ -200,10 +200,9 @@
 
     @util.propertycache
     def behindcount(self):
-        revs = self.revs[1:]
         deps, rdeps = self._dependencies
-        if revs:
-            minroot = [min(r for r in revs if not deps[r])]
+        if self._revs:
+            minroot = [min(r for r in self._revs if not deps[r])]
             try:
                 dest = destutil.destmerge(self._repo, action=b'rebase',
                                           sourceset=minroot,