# HG changeset patch # User Alexander Plavin # Date 2013-07-20 21:38:04 # Node ID e111d5e6bbbd7f77e72d158929a41af7353f48cf # Parent 074bd02352c04fe33f8989de38a40aea73754293 hgweb: fix duplication for some search queries Given that N is maximum revision number in a repo, than if a revision with number N-100n or N-100n+1 (for any integer n) is found with a hgweb search, this revision is duplicated in search results. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -119,7 +119,7 @@ def _search(web, req, tmpl): cl = web.repo.changelog for i in xrange(len(web.repo) - 1, 0, -100): l = [] - for j in cl.revs(max(0, i - 100), i + 1): + for j in cl.revs(max(0, i - 99), i): ctx = web.repo[j] l.append(ctx) l.reverse()