hgext3rd/topic/stack.py
changeset 3084 144989dabe93
parent 3061 6f87042766cb
child 3085 3eca2cbdc498
--- a/hgext3rd/topic/stack.py	Fri Oct 20 12:04:45 2017 +0200
+++ b/hgext3rd/topic/stack.py	Sun Oct 15 00:03:59 2017 +0530
@@ -275,26 +275,25 @@
     # 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')
         fm.startitem()