hgext3rd/topic/stack.py
changeset 4436 ef155f624670
parent 4435 7915aef191ff
child 4474 931c8f6f4b1b
--- 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