Show More
@@ -200,21 +200,22 b' def changelog(web, req, tmpl, shortlog=F' | |||||
200 | return _search(web, req, tmpl) # XXX redirect to 404 page? |
|
200 | return _search(web, req, tmpl) # XXX redirect to 404 page? | |
201 |
|
201 | |||
202 | def changelist(latestonly, **map): |
|
202 | def changelist(latestonly, **map): | |
203 | l = [] # build a list in forward order for efficiency |
|
|||
204 | revs = [] |
|
203 | revs = [] | |
205 |
if s |
|
204 | if pos != -1: | |
206 |
revs = web.repo.changelog.revs(s |
|
205 | revs = web.repo.changelog.revs(pos, 0) | |
207 | if latestonly: |
|
206 | if latestonly: | |
208 | for r in revs: |
|
207 | revs = (next(revs),) | |
209 | pass |
|
208 | curcount = 0 | |
210 | revs = (r,) |
|
|||
211 | for i in revs: |
|
209 | for i in revs: | |
212 | ctx = web.repo[i] |
|
210 | ctx = web.repo[i] | |
213 | n = ctx.node() |
|
211 | n = ctx.node() | |
214 | showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n) |
|
212 | showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n) | |
215 | files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles) |
|
213 | files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles) | |
216 |
|
214 | |||
217 | l.append({"parity": parity.next(), |
|
215 | curcount += 1 | |
|
216 | if curcount > revcount: | |||
|
217 | break | |||
|
218 | yield {"parity": parity.next(), | |||
218 |
|
|
219 | "author": ctx.user(), | |
219 |
|
|
220 | "parent": webutil.parents(ctx, i - 1), | |
220 |
|
|
221 | "child": webutil.children(ctx, i + 1), | |
@@ -229,9 +230,7 b' def changelog(web, req, tmpl, shortlog=F' | |||||
229 |
|
|
230 | "bookmarks": webutil.nodebookmarksdict(web.repo, n), | |
230 |
|
|
231 | "inbranch": webutil.nodeinbranch(web.repo, ctx), | |
231 |
|
|
232 | "branches": webutil.nodebranchdict(web.repo, ctx) | |
232 |
|
|
233 | } | |
233 | for e in reversed(l): |
|
|||
234 | yield e |
|
|||
235 |
|
234 | |||
236 | revcount = shortlog and web.maxshortchanges or web.maxchanges |
|
235 | revcount = shortlog and web.maxshortchanges or web.maxchanges | |
237 | if 'revcount' in req.form: |
|
236 | if 'revcount' in req.form: | |
@@ -246,9 +245,7 b' def changelog(web, req, tmpl, shortlog=F' | |||||
246 |
|
245 | |||
247 | count = len(web.repo) |
|
246 | count = len(web.repo) | |
248 | pos = ctx.rev() |
|
247 | pos = ctx.rev() | |
249 | start = max(0, pos - revcount + 1) |
|
248 | parity = paritygen(web.stripecount) | |
250 | end = pos + 1 |
|
|||
251 | parity = paritygen(web.stripecount, offset=start - end) |
|
|||
252 |
|
249 | |||
253 | changenav = webutil.revnav(web.repo).gen(pos, revcount, count) |
|
250 | changenav = webutil.revnav(web.repo).gen(pos, revcount, count) | |
254 |
|
251 |
General Comments 0
You need to be logged in to leave comments.
Login now