comparison hgext3rd/topic/stack.py @ 4649:6b7ad4b50d00

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.
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 05 May 2019 16:14:53 +0800
parents 48521a49a07e
children 7c05b1625921
comparison
equal deleted inserted replaced
4648:493470e7a0f2 4649:6b7ad4b50d00
316 316
317 symbol = None 317 symbol = None
318 states = [] 318 states = []
319 if opts.get('children'): 319 if opts.get('children'):
320 expr = 'children(%d) and merge() - %ld' 320 expr = 'children(%d) and merge() - %ld'
321 revisions = repo.revs(expr, ctx.rev(), st.revs[1:]) 321 revisions = repo.revs(expr, ctx.rev(), st._revs)
322 if len(revisions) > 0: 322 if len(revisions) > 0:
323 states.append('external-children') 323 states.append('external-children')
324 324
325 if ctx.orphan(): 325 if ctx.orphan():
326 symbol = '$' 326 symbol = '$'