stack: use stack._revs instead of stack.revs[1:] in external children revset
authorAnton Shestakov <av6@dwimlabs.net>
Sun, 05 May 2019 16:14:53 +0800
changeset 4649 6b7ad4b50d00
parent 4648 493470e7a0f2
child 4650 7c05b1625921
stack: use stack._revs instead of stack.revs[1:] in external children revset The revset in question excludes all revs that are part of the stack. Using stack.revs[1:] works (rev #0 is stack base, which is not a part of the stack), but using stack._revs is technically more correct, because this variable is specifically designed to hold only revisions that are part of the stack.
hgext3rd/topic/stack.py
--- a/hgext3rd/topic/stack.py	Tue Jun 04 10:30:56 2019 +0200
+++ b/hgext3rd/topic/stack.py	Sun May 05 16:14:53 2019 +0800
@@ -318,7 +318,7 @@
         states = []
         if opts.get('children'):
             expr = 'children(%d) and merge() - %ld'
-            revisions = repo.revs(expr, ctx.rev(), st.revs[1:])
+            revisions = repo.revs(expr, ctx.rev(), st._revs)
             if len(revisions) > 0:
                 states.append('external-children')