diff -r b76fe277cef2 -r b3efdd407f30 hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Thu Oct 19 19:56:18 2017 +0200 +++ b/hgext3rd/topic/stack.py Fri Oct 20 15:18:51 2017 +0200 @@ -275,28 +275,30 @@ # super crude initial version for idx, isentry, ctx in entries[::-1]: + symbol = None states = [] iscurrentrevision = repo.revs('%d and parents()', ctx.rev()) + if iscurrentrevision: + states.append('current') + symbol = '@' + + if ctx.orphan(): + symbol = '$' + states.append('unstable') + if not isentry: symbol = '^' # "base" is kind of a "ghost" entry - # skip other label for them (no current, no unstable) - states = ['base'] - elif ctx.orphan(): - # current revision can be unstable also, so in that case show both - # the states and the symbol '@' (issue5553) - if iscurrentrevision: - states.append('current') - symbol = '@' - symbol = '$' - states.append('unstable') - elif iscurrentrevision: - states.append('current') - symbol = '@' - else: + states.append('base') + + # none of the above if statments get executed + if not symbol: symbol = ':' states.append('clean') + + states.sort() + fm.startitem() fm.data(isentry=isentry)