Show More
@@ -310,12 +310,12 b' class hgweb(object):' | |||||
310 | fl = fctx.filelog() |
|
310 | fl = fctx.filelog() | |
311 | count = fl.count() |
|
311 | count = fl.count() | |
312 | pagelen = self.maxshortchanges |
|
312 | pagelen = self.maxshortchanges | |
|
313 | pos = fctx.filerev() | |||
|
314 | start = max(0, pos - pagelen + 1) | |||
|
315 | end = min(count, start + pagelen) | |||
|
316 | pos = end - 1 | |||
313 |
|
317 | |||
314 | def entries(**map): |
|
318 | def entries(**map): | |
315 | pos = fctx.filerev() |
|
|||
316 | start = max(0, pos - pagelen + 1) |
|
|||
317 | end = min(count, start + pagelen) |
|
|||
318 | pos = end - 1 |
|
|||
319 | l = [] |
|
319 | l = [] | |
320 | parity = (count - 1) & 1 |
|
320 | parity = (count - 1) & 1 | |
321 |
|
321 | |||
@@ -338,7 +338,7 b' class hgweb(object):' | |||||
338 | for e in l: |
|
338 | for e in l: | |
339 | yield e |
|
339 | yield e | |
340 |
|
340 | |||
341 |
nav = revnavgen( |
|
341 | nav = revnavgen(pos, pagelen, count) | |
342 | yield self.t("filelog", file=f, node=hex(fctx.node()), nav=nav, |
|
342 | yield self.t("filelog", file=f, node=hex(fctx.node()), nav=nav, | |
343 | entries=entries) |
|
343 | entries=entries) | |
344 |
|
344 |
General Comments 0
You need to be logged in to leave comments.
Login now