# HG changeset patch # User Yuya Nishihara # Date 2018-08-31 12:44:24 # Node ID ede3bf31fe63677fdf5bd8db687977d4e3d792ed # Parent d750a6c9248d9dd97de089f7d7e8da7dd99a0ebf hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972) "revcount + 1" is moved to the call site to make it clearer. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -394,12 +394,12 @@ def changelog(web, shortlog=False): 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 @@ def changelog(web, shortlog=False): 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:]