##// END OF EJS Templates
templatekw: simply override {graphwidth} function by mapping variable
Yuya Nishihara -
r36459:27cd8315 default
parent child Browse files
Show More
@@ -889,7 +889,7 b' def displaygraph(ui, repo, dag, displaye'
889 firstedge = next(edges)
889 firstedge = next(edges)
890 width = firstedge[2]
890 width = firstedge[2]
891 displayer.show(ctx, copies=copies,
891 displayer.show(ctx, copies=copies,
892 _graphwidth=width, **pycompat.strkwargs(props))
892 graphwidth=width, **pycompat.strkwargs(props))
893 lines = displayer.hunk.pop(rev).split('\n')
893 lines = displayer.hunk.pop(rev).split('\n')
894 if not lines[-1]:
894 if not lines[-1]:
895 del lines[-1]
895 del lines[-1]
@@ -552,9 +552,8 b' def showgraphnode(repo, ctx, **args):'
552 @templatekeyword('graphwidth')
552 @templatekeyword('graphwidth')
553 def showgraphwidth(repo, ctx, templ, **args):
553 def showgraphwidth(repo, ctx, templ, **args):
554 """Integer. The width of the graph drawn by 'log --graph' or zero."""
554 """Integer. The width of the graph drawn by 'log --graph' or zero."""
555 # The value args['graphwidth'] will be this function, so we use an internal
555 # just hosts documentation; should be overridden by template mapping
556 # name to pass the value through props into this function.
556 return 0
557 return args.get('_graphwidth', 0)
558
557
559 @templatekeyword('index')
558 @templatekeyword('index')
560 def showindex(**args):
559 def showindex(**args):
General Comments 0
You need to be logged in to leave comments. Login now