hgweb: load revcount + 1 entries to fill nextentry in log page (
issue5972)
"revcount + 1" is moved to the call site to make it clearer.
--- 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:]