diff mercurial/hgweb/webutil.py @ 36594:59ee648870a7

templatekw: switch obsfate-related template keywords to new API
author Yuya Nishihara <yuya@tcha.org>
date Sun, 25 Feb 2018 19:05:57 +0900
parents 7937850a523d
children a2fa51415ddc
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py	Sun Feb 25 18:52:51 2018 +0900
+++ b/mercurial/hgweb/webutil.py	Sun Feb 25 19:05:57 2018 +0900
@@ -352,12 +352,16 @@
 def formatlinerange(fromline, toline):
     return '%d:%d' % (fromline + 1, toline)
 
-def succsandmarkers(repo, ctx, **args):
-    for item in templatekw.showsuccsandmarkers(repo, ctx, **args):
+def succsandmarkers(context, mapping):
+    repo = context.resource(mapping, 'repo')
+    for item in templatekw.showsuccsandmarkers(context, mapping):
         item['successors'] = _siblings(repo[successor]
                                        for successor in item['successors'])
         yield item
 
+# teach templater succsandmarkers is switched to (context, mapping) API
+succsandmarkers._requires = {'repo', 'ctx', 'templ'}
+
 def commonentry(repo, ctx):
     node = ctx.node()
     return {