diff -r 69477bac8926 -r 7937850a523d mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Sun Feb 25 14:42:18 2018 +0900 +++ b/mercurial/hgweb/webutil.py Fri Dec 22 21:59:38 2017 +0900 @@ -352,8 +352,8 @@ def formatlinerange(fromline, toline): return '%d:%d' % (fromline + 1, toline) -def succsandmarkers(repo, ctx): - for item in templatekw.showsuccsandmarkers(repo, ctx): +def succsandmarkers(repo, ctx, **args): + for item in templatekw.showsuccsandmarkers(repo, ctx, **args): item['successors'] = _siblings(repo[successor] for successor in item['successors']) yield item @@ -361,6 +361,11 @@ def commonentry(repo, ctx): node = ctx.node() return { + # TODO: perhaps ctx.changectx() should be assigned if ctx is a + # filectx, but I'm not pretty sure if that would always work because + # fctx.parents() != fctx.changectx.parents() for example. + 'ctx': ctx, + 'revcache': {}, 'rev': ctx.rev(), 'node': hex(node), 'author': ctx.user(), @@ -369,7 +374,7 @@ 'extra': ctx.extra(), 'phase': ctx.phasestr(), 'obsolete': ctx.obsolete(), - 'succsandmarkers': lambda **x: succsandmarkers(repo, ctx), + 'succsandmarkers': succsandmarkers, 'instabilities': [{"instability": i} for i in ctx.instabilities()], 'branch': nodebranchnodefault(ctx), 'inbranch': nodeinbranch(repo, ctx),