Show More
@@ -398,14 +398,8 b' def changelog(web, shortlog=False):' | |||
|
398 | 398 | revs = [] |
|
399 | 399 | if pos != -1: |
|
400 | 400 | revs = web.repo.changelog.revs(pos, 0) |
|
401 | curcount = 0 | |
|
402 | for rev in revs: | |
|
403 | curcount += 1 | |
|
404 | if curcount > revcount + 1: | |
|
405 | break | |
|
406 | 401 | |
|
407 |
|
|
|
408 | entry['parity'] = next(parity) | |
|
402 | for entry in webutil.changelistentries(web, revs, revcount, parity): | |
|
409 | 403 | yield entry |
|
410 | 404 | |
|
411 | 405 | if shortlog: |
@@ -457,6 +457,22 b' def changelistentry(web, ctx):' | |||
|
457 | 457 | ) |
|
458 | 458 | return entry |
|
459 | 459 | |
|
460 | def changelistentries(web, revs, maxcount, parityfn): | |
|
461 | """Emit up to N records for an iterable of revisions.""" | |
|
462 | repo = web.repo | |
|
463 | ||
|
464 | count = 0 | |
|
465 | for rev in revs: | |
|
466 | if count >= maxcount: | |
|
467 | break | |
|
468 | ||
|
469 | count += 1 | |
|
470 | ||
|
471 | entry = changelistentry(web, repo[rev]) | |
|
472 | entry['parity'] = next(parityfn) | |
|
473 | ||
|
474 | yield entry | |
|
475 | ||
|
460 | 476 | def symrevorshortnode(req, ctx): |
|
461 | 477 | if 'node' in req.qsparams: |
|
462 | 478 | return templatefilters.revescape(req.qsparams['node']) |
General Comments 0
You need to be logged in to leave comments.
Login now