# HG changeset patch # User Denis Laxalde # Date 2017-01-17 08:17:29 # Node ID 4deb7c1a07ab92cb1dc2f814eb744774844daa83 # Parent 6e1d54be7588e215ca931cf584c40ffb61daecba hgweb: restore ascending iteration on revs in filelog web command Follow-up on 96f811bceb85. Adjust back the "parity" generator's offset to keep rendering the same. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -974,12 +974,12 @@ def filelog(web, req, tmpl): count = fctx.filerev() + 1 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page end = min(count, start + revcount) # last rev on this page - parity = paritygen(web.stripecount, offset=start - end + 1) + parity = paritygen(web.stripecount, offset=start - end) repo = web.repo revs = fctx.filelog().revs(start, end - 1) entries = [] - for i in reversed(revs): + for i in revs: iterfctx = fctx.filectx(i) entries.append(dict( parity=next(parity), @@ -987,6 +987,7 @@ def filelog(web, req, tmpl): file=f, rename=webutil.renamelink(iterfctx), **webutil.commonentry(repo, iterfctx))) + entries.reverse() latestentry = entries[:1]