diff -r 3b42478ef017 -r 5e9ce6310720 hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Mon Mar 14 18:40:00 2016 +0000 +++ b/hgext3rd/topic/stack.py Mon Mar 14 18:43:23 2016 +0000 @@ -20,7 +20,21 @@ raise error.Abort(_('no active topic to list')) for idx, r in enumerate(getstack(repo, topic)): # super crude initial version - l = "t%d: %s\n" % (idx, repo[r].description().splitlines()[0]) + symbol = ':' + state = 'clean' + if repo.revs('%d and parents()', r): + symbol = '@' + state = 'current' + if repo.revs('%d and unstable()', r): + symbol = '$' + state = 'unstable' + if state == 'clean': + l = "t%d%s %s\n" % (idx, symbol, + repo[r].description().splitlines()[0]) + else: + l = "t%d%s %s (%s)\n" % (idx, symbol, + repo[r].description().splitlines()[0], + state) ui.write(l) # Copied from evolve 081605c2e9b6