comparison mercurial/templatekw.py @ 37274:45987e2b64f0

templatekw: do not directly call .gen
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Mar 2018 00:11:36 +0900
parents be3f33f5e232
children 11d51e518808
comparison
equal deleted inserted replaced
37273:83e1bbd48991 37274:45987e2b64f0
611 lambda x: scmutil.formatchangeid(repo[x])) 611 lambda x: scmutil.formatchangeid(repo[x]))
612 data.append(h) 612 data.append(h)
613 613
614 # Format the successorssets 614 # Format the successorssets
615 def render(d): 615 def render(d):
616 t = [] 616 return templateutil.stringify(context, mapping, d)
617 for i in d.gen():
618 t.append(i)
619 return "".join(t)
620 617
621 def gen(data): 618 def gen(data):
622 yield "; ".join(render(d) for d in data) 619 yield "; ".join(render(d) for d in data)
623 620
624 return _hybrid(gen(data), data, lambda x: {'successorset': x}, 621 return _hybrid(gen(data), data, lambda x: {'successorset': x},