diff mercurial/templatekw.py @ 38283:0e0d03d09ecd

templater: rename mappable to hybriditem as it is the primary use case This frees up the name 'mappable' for new interface type.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 09 Jun 2018 12:36:06 +0900
parents ec37df9042f9
children 8d6109b49b31
line wrap: on
line diff
--- a/mercurial/templatekw.py	Fri Jun 08 23:32:33 2018 +0900
+++ b/mercurial/templatekw.py	Sat Jun 09 12:36:06 2018 +0900
@@ -31,7 +31,6 @@
 )
 
 _hybrid = templateutil.hybrid
-_mappable = templateutil.mappable
 hybriddict = templateutil.hybriddict
 hybridlist = templateutil.hybridlist
 compatdict = templateutil.compatdict
@@ -469,7 +468,8 @@
     f = context.process('manifest', mapping)
     # TODO: perhaps 'ctx' should be dropped from mapping because manifest
     # rev and node are completely different from changeset's.
-    return _mappable(f, None, f, lambda x: {'rev': mrev, 'node': mhex})
+    return templateutil.hybriditem(f, None, f,
+                                   lambda x: {'rev': mrev, 'node': mhex})
 
 @templatekeyword('obsfate', requires={'ui', 'repo', 'ctx'})
 def showobsfate(context, mapping):