# HG changeset patch # User Pierre-Yves David # Date 1357862880 -3600 # Node ID 56ca4443a343b81063cac8d38ce86f14c004cdc3 # Parent 01638b51df4482837fbaebc3963dba1669c882b0 hgweb: use changelog for iteration Iterating through changelog is necessary to enforce filtering. diff -r 01638b51df44 -r 56ca4443a343 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Wed Jan 16 14:19:28 2013 +0100 +++ b/mercurial/hgweb/webcommands.py Fri Jan 11 01:08:00 2013 +0100 @@ -196,10 +196,13 @@ def changelist(latestonly, **map): l = [] # build a list in forward order for efficiency + revs = [] + if start < end: + revs = web.repo.changelog.revs(start, end - 1) if latestonly: - revs = (end - 1,) - else: - revs = xrange(start, end) + for r in revs: + pass + revs = (r,) for i in revs: ctx = web.repo[i] n = ctx.node() @@ -745,10 +748,11 @@ l = [] repo = web.repo + revs = repo.changelog.revs(start, end - 1) if latestonly: - revs = (end - 1,) - else: - revs = xrange(start, end) + for r in revs: + pass + revs = (r,) for i in revs: iterfctx = fctx.filectx(i)