1321 dag = graphmod.dagwalker(web.repo, smartset.baseset(revs)) |
1321 dag = graphmod.dagwalker(web.repo, smartset.baseset(revs)) |
1322 tree = list(item for item in graphmod.colored(dag, web.repo) |
1322 tree = list(item for item in graphmod.colored(dag, web.repo) |
1323 if item[1] == graphmod.CHANGESET) |
1323 if item[1] == graphmod.CHANGESET) |
1324 return tree |
1324 return tree |
1325 |
1325 |
1326 def jsdata(): |
1326 def jsdata(context): |
1327 return [{'node': pycompat.bytestr(ctx), |
1327 for (id, type, ctx, vtx, edges) in fulltree(): |
1328 'graphnode': webutil.getgraphnode(web.repo, ctx), |
1328 yield {'node': pycompat.bytestr(ctx), |
1329 'vertex': vtx, |
1329 'graphnode': webutil.getgraphnode(web.repo, ctx), |
1330 'edges': edges} |
1330 'vertex': vtx, |
1331 for (id, type, ctx, vtx, edges) in fulltree()] |
1331 'edges': edges} |
1332 |
1332 |
1333 def nodes(): |
1333 def nodes(): |
1334 parity = paritygen(web.stripecount) |
1334 parity = paritygen(web.stripecount) |
1335 for row, (id, type, ctx, vtx, edges) in enumerate(tree): |
1335 for row, (id, type, ctx, vtx, edges) in enumerate(tree): |
1336 entry = webutil.commonentry(web.repo, ctx) |
1336 entry = webutil.commonentry(web.repo, ctx) |
1364 graphvars=graphvars, |
1364 graphvars=graphvars, |
1365 rows=rows, |
1365 rows=rows, |
1366 bg_height=bg_height, |
1366 bg_height=bg_height, |
1367 changesets=count, |
1367 changesets=count, |
1368 nextentry=templateutil.mappinglist(nextentry), |
1368 nextentry=templateutil.mappinglist(nextentry), |
1369 jsdata=lambda **x: jsdata(), |
1369 jsdata=templateutil.mappinggenerator(jsdata), |
1370 nodes=lambda **x: nodes(), |
1370 nodes=lambda **x: nodes(), |
1371 node=ctx.hex(), |
1371 node=ctx.hex(), |
1372 changenav=changenav) |
1372 changenav=changenav) |
1373 |
1373 |
1374 def _getdoc(e): |
1374 def _getdoc(e): |