compat: more straight forward alias for old template names
The template registration have significantly changed in core:7b74afec6772. We
take simpler approach to define the alias in a way that works for all versions.
--- a/hgext3rd/evolve/templatekw.py Fri Mar 02 16:31:08 2018 -0500
+++ b/hgext3rd/evolve/templatekw.py Sat Mar 03 22:12:35 2018 -0500
@@ -48,7 +48,7 @@
**args)
if util.safehasattr(templatekw, 'showpredecessors'):
- eh.templatekw("precursors")(templatekw.showpredecessors)
+ templatekw.keywords["precursors"] = templatekw.showpredecessors
else:
# for version <= hg4.3
def closestprecursors(repo, nodeid):
@@ -97,7 +97,7 @@
return directsuccessorssets(repo, nodeid)
if util.safehasattr(templatekw, 'showsuccessorssets'):
- eh.templatekw("successors")(templatekw.showsuccessorssets)
+ templatekw.keywords["successors"] = templatekw.showsuccessorssets
else:
# for version <= hg4.3