Show More
@@ -463,6 +463,17 b' def symrevorshortnode(req, ctx):' | |||||
463 | else: |
|
463 | else: | |
464 | return short(ctx.node()) |
|
464 | return short(ctx.node()) | |
465 |
|
465 | |||
|
466 | def _listfilesgen(tmpl, ctx, stripecount): | |||
|
467 | parity = paritygen(stripecount) | |||
|
468 | for blockno, f in enumerate(ctx.files()): | |||
|
469 | template = 'filenodelink' if f in ctx else 'filenolink' | |||
|
470 | yield tmpl.generate(template, { | |||
|
471 | 'node': ctx.hex(), | |||
|
472 | 'file': f, | |||
|
473 | 'blockno': blockno + 1, | |||
|
474 | 'parity': next(parity), | |||
|
475 | }) | |||
|
476 | ||||
466 | def changesetentry(web, ctx): |
|
477 | def changesetentry(web, ctx): | |
467 | '''Obtain a dictionary to be used to render the "changeset" template.''' |
|
478 | '''Obtain a dictionary to be used to render the "changeset" template.''' | |
468 |
|
479 | |||
@@ -470,17 +481,6 b' def changesetentry(web, ctx):' | |||||
470 | showbookmarks = showbookmark(web.repo, 'changesetbookmark', ctx.node()) |
|
481 | showbookmarks = showbookmark(web.repo, 'changesetbookmark', ctx.node()) | |
471 | showbranch = nodebranchnodefault(ctx) |
|
482 | showbranch = nodebranchnodefault(ctx) | |
472 |
|
483 | |||
473 | files = [] |
|
|||
474 | parity = paritygen(web.stripecount) |
|
|||
475 | for blockno, f in enumerate(ctx.files()): |
|
|||
476 | template = 'filenodelink' if f in ctx else 'filenolink' |
|
|||
477 | files.append(web.tmpl.generate(template, { |
|
|||
478 | 'node': ctx.hex(), |
|
|||
479 | 'file': f, |
|
|||
480 | 'blockno': blockno + 1, |
|
|||
481 | 'parity': next(parity), |
|
|||
482 | })) |
|
|||
483 |
|
||||
484 | basectx = basechangectx(web.repo, web.req) |
|
484 | basectx = basechangectx(web.repo, web.req) | |
485 | if basectx is None: |
|
485 | if basectx is None: | |
486 | basectx = ctx.p1() |
|
486 | basectx = ctx.p1() | |
@@ -502,7 +502,7 b' def changesetentry(web, ctx):' | |||||
502 | changesettag=showtags, |
|
502 | changesettag=showtags, | |
503 | changesetbookmark=showbookmarks, |
|
503 | changesetbookmark=showbookmarks, | |
504 | changesetbranch=showbranch, |
|
504 | changesetbranch=showbranch, | |
505 | files=files, |
|
505 | files=list(_listfilesgen(web.tmpl, ctx, web.stripecount)), | |
506 | diffsummary=lambda **x: diffsummary(diffstatsgen), |
|
506 | diffsummary=lambda **x: diffsummary(diffstatsgen), | |
507 | diffstat=diffstats, |
|
507 | diffstat=diffstats, | |
508 | archives=web.archivelist(ctx.hex()), |
|
508 | archives=web.archivelist(ctx.hex()), |
General Comments 0
You need to be logged in to leave comments.
Login now