hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972) stable 4.7.1
authorYuya Nishihara <yuya@tcha.org>
Fri, 31 Aug 2018 21:44:24 +0900
branchstable
changeset 39416 ede3bf31fe63
parent 39264 d750a6c9248d
child 39417 77442f9c6790
hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972) "revcount + 1" is moved to the call site to make it clearer.
mercurial/hgweb/webcommands.py
--- 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:]