comparison mercurial/hgweb/webcommands.py @ 28210:964ad57eff30

hgweb: remove unused argument from graphdata() factory As graphdata() is wrapped by lambda, there's no reason to pass unused arguments to it.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 04 Jan 2016 22:55:05 +0900
parents 8f8f3b13252d
children 446465888119
comparison
equal deleted inserted replaced
28209:8ddf893560fa 28210:964ad57eff30
1133 continue 1133 continue
1134 cols = max(cols, max([edge[0] for edge in edges] or [0]), 1134 cols = max(cols, max([edge[0] for edge in edges] or [0]),
1135 max([edge[1] for edge in edges] or [0])) 1135 max([edge[1] for edge in edges] or [0]))
1136 return cols 1136 return cols
1137 1137
1138 def graphdata(usetuples, **map): 1138 def graphdata(usetuples):
1139 data = [] 1139 data = []
1140 1140
1141 row = 0 1141 row = 0
1142 for (id, type, ctx, vtx, edges) in tree: 1142 for (id, type, ctx, vtx, edges) in tree:
1143 if type != graphmod.CHANGESET: 1143 if type != graphmod.CHANGESET:
1193 lessvars=lessvars, morevars=morevars, downrev=downrev, 1193 lessvars=lessvars, morevars=morevars, downrev=downrev,
1194 cols=cols, rows=rows, 1194 cols=cols, rows=rows,
1195 canvaswidth=(cols + 1) * bg_height, 1195 canvaswidth=(cols + 1) * bg_height,
1196 truecanvasheight=rows * bg_height, 1196 truecanvasheight=rows * bg_height,
1197 canvasheight=canvasheight, bg_height=bg_height, 1197 canvasheight=canvasheight, bg_height=bg_height,
1198 jsdata=lambda **x: graphdata(True, **x), 1198 jsdata=lambda **x: graphdata(True),
1199 nodes=lambda **x: graphdata(False, **x), 1199 nodes=lambda **x: graphdata(False),
1200 node=ctx.hex(), changenav=changenav) 1200 node=ctx.hex(), changenav=changenav)
1201 1201
1202 def _getdoc(e): 1202 def _getdoc(e):
1203 doc = e[0].__doc__ 1203 doc = e[0].__doc__
1204 if doc: 1204 if doc: