comparison mercurial/hgweb/hgweb_mod.py @ 3223:35d61e653174

fix warnings from pychecker
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 02 Oct 2006 21:10:31 +0200
parents 5c6028778c5a
children 1f1af9b273e8
comparison
equal deleted inserted replaced
3222:3bd3a98b4921 3223:35d61e653174
208 for e in l: 208 for e in l:
209 yield e 209 yield e
210 210
211 maxchanges = shortlog and self.maxshortchanges or self.maxchanges 211 maxchanges = shortlog and self.maxshortchanges or self.maxchanges
212 cl = self.repo.changelog 212 cl = self.repo.changelog
213 mf = cl.read(cl.tip())[0]
214 count = cl.count() 213 count = cl.count()
215 start = max(0, pos - maxchanges + 1) 214 start = max(0, pos - maxchanges + 1)
216 end = min(count, start + maxchanges) 215 end = min(count, start + maxchanges)
217 pos = end - 1 216 pos = end - 1
218 217
304 files=files, 303 files=files,
305 archives=self.archivelist(hex(n))) 304 archives=self.archivelist(hex(n)))
306 305
307 def filelog(self, fctx): 306 def filelog(self, fctx):
308 f = fctx.path() 307 f = fctx.path()
309 cl = self.repo.changelog
310 fl = fctx.filelog() 308 fl = fctx.filelog()
311 count = fl.count() 309 count = fl.count()
312 310
313 def entries(**map): 311 def entries(**map):
314 l = [] 312 l = []
503 count += 1 501 count += 1
504 if count > 10: # limit to 10 tags 502 if count > 10: # limit to 10 tags
505 break; 503 break;
506 504
507 c = cl.read(n) 505 c = cl.read(n)
508 m = c[0]
509 t = c[2] 506 t = c[2]
510 507
511 yield self.t("tagentry", 508 yield self.t("tagentry",
512 parity = self.stripes(parity), 509 parity = self.stripes(parity),
513 tag = k, 510 tag = k,