--- a/hgext3rd/evolve/obshistory.py Fri Dec 27 20:38:10 2019 -0800
+++ b/hgext3rd/evolve/obshistory.py Fri Dec 27 20:40:13 2019 -0800
@@ -113,9 +113,20 @@
}
TEMPLATE_VERB = b"""{label("evolve.verb", verb)}"""
TEMPLATE_SUCCNODES = b"""{label("evolve.node", join(succnodes % "{succnode|short}", ", "))}"""
-TEMPLATE_REWRITE = b"""{if(succnodes, "%(verb)s{if(effects, "({join(effects, ", ")})")} as %(succnodes)s", "pruned")}""" % {
+TEMPLATE_PRECNODE = b"""{label("evolve.node", precnode|short)}"""
+TEMPLATE_REWRITE_NODES = b"""{ifeq(nodetype, "precursor", "as %(succnodes)s", "from %(precnode)s")}""" % {
+ b"succnodes": TEMPLATE_SUCCNODES,
+ b"precnode": TEMPLATE_PRECNODE,
+}
+TEMPLATE_REWRITE_MARKER = b"""%(verb)s{if(effects, "({join(effects, ", ")})")} %(nodes)s""" % {
b"verb": TEMPLATE_VERB,
- b"succnodes": TEMPLATE_SUCCNODES
+ b"nodes": TEMPLATE_REWRITE_NODES,
+}
+# Output the marker details if either this is the successor of the marker or
+# there are successors.
+TEMPLATE_REWRITE = b"""{
+ifeq(nodetype, "successor", "%(marker)s", if(succnodes, "%(marker)s", "pruned"))}""" % {
+ b"marker": TEMPLATE_REWRITE_MARKER,
}
TEMPLATE_OPERATION = b"""{if(operation, "using {label("evolve.operation", operation)}")}"""
TEMPLATE_USER = b"""by {label("evolve.user", user)}"""