Mercurial > hg
changeset 18427:56ca4443a343
hgweb: use changelog for iteration
Iterating through changelog is necessary to enforce filtering.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 11 Jan 2013 01:08:00 +0100 |
parents | 01638b51df44 |
children | 8c10f760ca34 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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)