Mercurial > hg-stable
changeset 38780:ede3bf31fe63 stable 4.7.1
hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972)
"revcount + 1" is moved to the call site to make it clearer.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 31 Aug 2018 21:44:24 +0900 |
parents | d750a6c9248d |
children | 77442f9c6790 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Fri Aug 24 18:21:55 2018 -0700 +++ b/mercurial/hgweb/webcommands.py Fri Aug 31 21:44:24 2018 +0900 @@ -394,12 +394,12 @@ ctx = web.repo['tip'] symrev = 'tip' - def changelist(): + def changelist(maxcount): revs = [] if pos != -1: revs = web.repo.changelog.revs(pos, 0) - for entry in webutil.changelistentries(web, revs, revcount, parity): + for entry in webutil.changelistentries(web, revs, maxcount, parity): yield entry if shortlog: @@ -426,7 +426,7 @@ changenav = webutil.revnav(web.repo).gen(pos, revcount, count) - entries = list(changelist()) + entries = list(changelist(revcount + 1)) latestentry = entries[:1] if len(entries) > revcount: nextentry = entries[-1:]