##// END OF EJS Templates
hgweb: build the "entries" list directly in filelog command...
Denis Laxalde -
r30816:96f811bc default
parent child Browse files
Show More
@@ -974,26 +974,20 b' def filelog(web, req, tmpl):'
974 count = fctx.filerev() + 1
974 count = fctx.filerev() + 1
975 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page
975 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page
976 end = min(count, start + revcount) # last rev on this page
976 end = min(count, start + revcount) # last rev on this page
977 parity = paritygen(web.stripecount, offset=start - end)
977 parity = paritygen(web.stripecount, offset=start - end + 1)
978
979 def entries():
980 l = []
981
982 repo = web.repo
983 revs = fctx.filelog().revs(start, end - 1)
984 for i in revs:
985 iterfctx = fctx.filectx(i)
986
978
987 l.append(dict(
979 repo = web.repo
988 parity=next(parity),
980 revs = fctx.filelog().revs(start, end - 1)
989 filerev=i,
981 entries = []
990 file=f,
982 for i in reversed(revs):
991 rename=webutil.renamelink(iterfctx),
983 iterfctx = fctx.filectx(i)
992 **webutil.commonentry(repo, iterfctx)))
984 entries.append(dict(
993 for e in reversed(l):
985 parity=next(parity),
994 yield e
986 filerev=i,
987 file=f,
988 rename=webutil.renamelink(iterfctx),
989 **webutil.commonentry(repo, iterfctx)))
995
990
996 entries = list(entries())
997 latestentry = entries[:1]
991 latestentry = entries[:1]
998
992
999 revnav = webutil.filerevnav(web.repo, fctx.path())
993 revnav = webutil.filerevnav(web.repo, fctx.path())
General Comments 0
You need to be logged in to leave comments. Login now