972 morevars['revcount'] = revcount * 2 |
972 morevars['revcount'] = revcount * 2 |
973 |
973 |
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 + 1) |
977 parity = paritygen(web.stripecount, offset=start - end) |
978 |
978 |
979 repo = web.repo |
979 repo = web.repo |
980 revs = fctx.filelog().revs(start, end - 1) |
980 revs = fctx.filelog().revs(start, end - 1) |
981 entries = [] |
981 entries = [] |
982 for i in reversed(revs): |
982 for i in revs: |
983 iterfctx = fctx.filectx(i) |
983 iterfctx = fctx.filectx(i) |
984 entries.append(dict( |
984 entries.append(dict( |
985 parity=next(parity), |
985 parity=next(parity), |
986 filerev=i, |
986 filerev=i, |
987 file=f, |
987 file=f, |
988 rename=webutil.renamelink(iterfctx), |
988 rename=webutil.renamelink(iterfctx), |
989 **webutil.commonentry(repo, iterfctx))) |
989 **webutil.commonentry(repo, iterfctx))) |
|
990 entries.reverse() |
990 |
991 |
991 latestentry = entries[:1] |
992 latestentry = entries[:1] |
992 |
993 |
993 revnav = webutil.filerevnav(web.repo, fctx.path()) |
994 revnav = webutil.filerevnav(web.repo, fctx.path()) |
994 nav = revnav.gen(end - 1, revcount, count) |
995 nav = revnav.gen(end - 1, revcount, count) |