mercurial/templater.py
changeset 37074 2891079fb0c0
parent 37073 44757e6dad93
child 37075 46859b437697
--- a/mercurial/templater.py	Thu Mar 15 20:43:39 2018 +0900
+++ b/mercurial/templater.py	Thu Mar 15 21:22:52 2018 +0900
@@ -613,6 +613,13 @@
         self._aliasmap = _aliasrules.buildmap(aliases)
         self._cache = {}  # key: (func, data)
 
+    def overlaymap(self, origmapping, newmapping):
+        """Create combined mapping from the original mapping and partial
+        mapping to override the original"""
+        mapping = origmapping.copy()
+        mapping.update(newmapping)
+        return mapping
+
     def symbol(self, mapping, key):
         """Resolve symbol to value or function; None if nothing found"""
         v = None