hgext3rd/topic/stack.py
changeset 2626 bc36a608e9e4
parent 2348 5737e0680f10
child 2627 42abd3bd30ee
--- a/hgext3rd/topic/stack.py	Mon Jun 19 02:44:19 2017 +0530
+++ b/hgext3rd/topic/stack.py	Mon Jun 19 02:50:35 2017 +0530
@@ -69,19 +69,22 @@
         states = []
         iscurrentrevision = repo.revs('%d and parents()', ctx.rev())
 
-        if iscurrentrevision:
-            states.append('current')
-
         if not isentry:
             symbol = '^'
             # "base" is kind of a "ghost" entry
             # skip other label for them (no current, no unstable)
             states = ['base']
-        elif iscurrentrevision:
-            symbol = '@'
         elif repo.revs('%d and unstable()', ctx.rev()):
+            # 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:
             symbol = ':'
             states.append('clean')