hgext/transplant.py
changeset 36514 7b74afec6772
parent 36229 6ea0b78ddcac
child 36835 5bc7ff103081
--- a/hgext/transplant.py	Sun Feb 25 14:28:32 2018 +0900
+++ b/hgext/transplant.py	Sun Feb 25 13:40:46 2018 +0900
@@ -744,10 +744,11 @@
 
 templatekeyword = registrar.templatekeyword()
 
-@templatekeyword('transplanted')
-def kwtransplanted(repo, ctx, **args):
+@templatekeyword('transplanted', requires={'ctx'})
+def kwtransplanted(context, mapping):
     """String. The node identifier of the transplanted
     changeset if any."""
+    ctx = context.resource(mapping, 'ctx')
     n = ctx.extra().get('transplant_source')
     return n and nodemod.hex(n) or ''