##// END OF EJS Templates
hgweb: always compute all entries and latestentry in changelog...
Alexander Plavin -
r19737:ab5442f4 default
parent child Browse files
Show More
@@ -259,12 +259,10 b' def changelog(web, req, tmpl, shortlog=F'
259 else:
259 else:
260 ctx = web.repo['tip']
260 ctx = web.repo['tip']
261
261
262 def changelist(latestonly):
262 def changelist():
263 revs = []
263 revs = []
264 if pos != -1:
264 if pos != -1:
265 revs = web.repo.changelog.revs(pos, 0)
265 revs = web.repo.changelog.revs(pos, 0)
266 if latestonly:
267 revs = (revs.next(),)
268 curcount = 0
266 curcount = 0
269 for i in revs:
267 for i in revs:
270 ctx = web.repo[i]
268 ctx = web.repo[i]
@@ -309,10 +307,13 b' def changelog(web, req, tmpl, shortlog=F'
309
307
310 changenav = webutil.revnav(web.repo).gen(pos, revcount, count)
308 changenav = webutil.revnav(web.repo).gen(pos, revcount, count)
311
309
310 entries = list(changelist())
311 latestentry = entries[:1]
312
312 return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
313 return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
313 node=ctx.hex(), rev=pos, changesets=count,
314 node=ctx.hex(), rev=pos, changesets=count,
314 entries=lambda **x: changelist(latestonly=False),
315 entries=entries,
315 latestentry=lambda **x: changelist(latestonly=True),
316 latestentry=latestentry,
316 archives=web.archivelist("tip"), revcount=revcount,
317 archives=web.archivelist("tip"), revcount=revcount,
317 morevars=morevars, lessvars=lessvars, query=query)
318 morevars=morevars, lessvars=lessvars, query=query)
318
319
General Comments 0
You need to be logged in to leave comments. Login now