Show More
@@ -116,12 +116,11 b' def _search(web, req, tmpl):' | |||||
116 | morevars['rev'] = query |
|
116 | morevars['rev'] = query | |
117 |
|
117 | |||
118 | def changelist(**map): |
|
118 | def changelist(**map): | |
119 | cl = web.repo.changelog |
|
|||
120 | count = 0 |
|
119 | count = 0 | |
121 | qw = query.lower().split() |
|
120 | qw = query.lower().split() | |
122 |
|
121 | |||
123 | def revgen(): |
|
122 | def revgen(): | |
124 |
for i in xrange(len( |
|
123 | for i in xrange(len(web.repo) - 1, 0, -100): | |
125 | l = [] |
|
124 | l = [] | |
126 | for j in xrange(max(0, i - 100), i + 1): |
|
125 | for j in xrange(max(0, i - 100), i + 1): | |
127 | ctx = web.repo[j] |
|
126 | ctx = web.repo[j] | |
@@ -164,10 +163,10 b' def _search(web, req, tmpl):' | |||||
164 | if count >= revcount: |
|
163 | if count >= revcount: | |
165 | break |
|
164 | break | |
166 |
|
165 | |||
167 | cl = web.repo.changelog |
|
166 | tip = web.repo['tip'] | |
168 | parity = paritygen(web.stripecount) |
|
167 | parity = paritygen(web.stripecount) | |
169 |
|
168 | |||
170 |
return tmpl('search', query=query, node=hex( |
|
169 | return tmpl('search', query=query, node=tip.hex(), | |
171 | entries=changelist, archives=web.archivelist("tip"), |
|
170 | entries=changelist, archives=web.archivelist("tip"), | |
172 | morevars=morevars, lessvars=lessvars) |
|
171 | morevars=morevars, lessvars=lessvars) | |
173 |
|
172 | |||
@@ -224,8 +223,7 b' def changelog(web, req, tmpl, shortlog=F' | |||||
224 | morevars = copy.copy(tmpl.defaults['sessionvars']) |
|
223 | morevars = copy.copy(tmpl.defaults['sessionvars']) | |
225 | morevars['revcount'] = revcount * 2 |
|
224 | morevars['revcount'] = revcount * 2 | |
226 |
|
225 | |||
227 |
c |
|
226 | count = len(web.repo) | |
228 | count = len(cl) |
|
|||
229 | pos = ctx.rev() |
|
227 | pos = ctx.rev() | |
230 | start = max(0, pos - revcount + 1) |
|
228 | start = max(0, pos - revcount + 1) | |
231 | end = min(count, start + revcount) |
|
229 | end = min(count, start + revcount) | |
@@ -467,19 +465,19 b' def summary(web, req, tmpl):' | |||||
467 |
|
465 | |||
468 | yield l |
|
466 | yield l | |
469 |
|
467 | |||
470 | cl = web.repo.changelog |
|
468 | tip = web.repo['tip'] | |
471 |
count = len( |
|
469 | count = len(web.repo) | |
472 | start = max(0, count - web.maxchanges) |
|
470 | start = max(0, count - web.maxchanges) | |
473 | end = min(count, start + web.maxchanges) |
|
471 | end = min(count, start + web.maxchanges) | |
474 |
|
472 | |||
475 | return tmpl("summary", |
|
473 | return tmpl("summary", | |
476 | desc=web.config("web", "description", "unknown"), |
|
474 | desc=web.config("web", "description", "unknown"), | |
477 | owner=get_contact(web.config) or "unknown", |
|
475 | owner=get_contact(web.config) or "unknown", | |
478 |
lastchange= |
|
476 | lastchange=tip.date(), | |
479 | tags=tagentries, |
|
477 | tags=tagentries, | |
480 | branches=branches, |
|
478 | branches=branches, | |
481 | shortlog=changelist, |
|
479 | shortlog=changelist, | |
482 |
node=hex( |
|
480 | node=tip.hex(), | |
483 | archives=web.archivelist("tip")) |
|
481 | archives=web.archivelist("tip")) | |
484 |
|
482 | |||
485 | def filediff(web, req, tmpl): |
|
483 | def filediff(web, req, tmpl): |
General Comments 0
You need to be logged in to leave comments.
Login now