Mercurial > evolve
diff hgext3rd/topic/stack.py @ 4436:ef155f624670
stack: make @ (current) more important than $ (some sort of unstable)
Base is still ^ even if it's currently checked out.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 10 Mar 2019 18:50:00 +0800 |
parents | 7915aef191ff |
children | 931c8f6f4b1b |
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py Sat Mar 09 13:13:53 2019 +0800 +++ b/hgext3rd/topic/stack.py Sun Mar 10 18:50:00 2019 +0800 @@ -321,17 +321,12 @@ symbol = None states = [] - iscurrentrevision = repo.revs('%d and parents()', ctx.rev()) if opts.get('children'): expr = 'children(%d) and merge() - %ld' revisions = repo.revs(expr, ctx.rev(), st.revs[1:]) if len(revisions) > 0: states.append('external-children') - if iscurrentrevision: - symbol = '@' - states.append('current') - if ctx.orphan(): symbol = '$' states.append('orphan') @@ -344,6 +339,11 @@ symbol = '$' states.append('phase divergent') + iscurrentrevision = repo.revs('%d and parents()', ctx.rev()) + if iscurrentrevision: + symbol = '@' + states.append('current') + if not isentry: symbol = '^' # "base" is kind of a "ghost" entry