Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webcommands.py @ 19462:a87d9102f7af
hgweb: always start log with searched revision
This makes the specified revision be always on top of the list.
Before the patch, for example with repo having revisions 0, 1, 2, 3 and user
searching for '2', all revisions were shown and the specified one wasn't
the first.
author | Alexander Plavin <me@aplavin.ru> |
---|---|
date | Sat, 13 Jul 2013 02:36:29 +0400 |
parents | f5abfa08fb09 |
children | 02c71f96eb6c |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Mon Jul 01 06:50:58 2013 +0200 +++ b/mercurial/hgweb/webcommands.py Sat Jul 13 02:36:29 2013 +0400 @@ -247,8 +247,7 @@ count = len(web.repo) pos = ctx.rev() start = max(0, pos - revcount + 1) - end = min(count, start + revcount) - pos = end - 1 + end = pos + 1 parity = paritygen(web.stripecount, offset=start - end) changenav = webutil.revnav(web.repo).gen(pos, revcount, count)