diff hgext3rd/topic/stack.py @ 4435:7915aef191ff

stack: show content and phase divergent state and symbol Replacing ' ' with '-' is just for color labels.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 09 Mar 2019 13:13:53 +0800
parents 432f2155d106
children ef155f624670
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py	Sat Mar 09 12:54:00 2019 +0800
+++ b/hgext3rd/topic/stack.py	Sat Mar 09 13:13:53 2019 +0800
@@ -219,7 +219,7 @@
     """ Takes a label prefix and a list of suffixes. Returns a string of the prefix
     formatted with each suffix separated with a space.
     """
-    return ' '.join(prefix % suffix for suffix in labelssuffix)
+    return ' '.join(prefix % suffix.replace(' ', '-') for suffix in labelssuffix)
 
 def showstack(ui, repo, branch=None, topic=None, opts=None):
     if opts is None:
@@ -336,6 +336,14 @@
             symbol = '$'
             states.append('orphan')
 
+        if ctx.contentdivergent():
+            symbol = '$'
+            states.append('content divergent')
+
+        if ctx.phasedivergent():
+            symbol = '$'
+            states.append('phase divergent')
+
         if not isentry:
             symbol = '^'
             # "base" is kind of a "ghost" entry