mercurial/formatter.py
changeset 37105 e7bc0667c521
parent 37104 7db3c28dfdfd
child 37500 8bb3899a0f47
--- a/mercurial/formatter.py	Sat Mar 17 17:41:07 2018 +0900
+++ b/mercurial/formatter.py	Sat Mar 17 17:54:33 2018 +0900
@@ -514,8 +514,10 @@
         mapping = {}
         if self._hasctx(newmapping):
             mapping['revcache'] = {}  # per-ctx cache
-        if 'node' in origmapping and 'node' in newmapping:
-            mapping['originalnode'] = origmapping['node']
+        if (('node' in origmapping or self._hasctx(origmapping))
+            and ('node' in newmapping or self._hasctx(newmapping))):
+            orignode = templateutil.runsymbol(context, origmapping, 'node')
+            mapping['originalnode'] = orignode
         return mapping
 
     def _getsome(self, context, mapping, key):