##// END OF EJS Templates
fix changenav for maxchanges != 10...
Johannes Stezenbach -
r1703:41d884f7 default
parent child Browse files
Show More
@@ -298,19 +298,25 b' class hgweb(object):'
298 298
299 299 def changelog(self, pos):
300 300 def changenav(**map):
301 def seq(factor=1):
301 def seq(factor, maxchanges=None):
302 if maxchanges:
303 yield maxchanges
304 if maxchanges >= 20 and maxchanges <= 40:
305 yield 50
306 else:
302 307 yield 1 * factor
303 308 yield 3 * factor
304 #yield 5 * factor
305 309 for f in seq(factor * 10):
306 310 yield f
307 311
308 312 l = []
309 for f in seq():
310 if f < self.maxchanges / 2:
313 last = 0
314 for f in seq(1, self.maxchanges):
315 if f < self.maxchanges or f <= last:
311 316 continue
312 317 if f > count:
313 318 break
319 last = f
314 320 r = "%d" % f
315 321 if pos + f < count:
316 322 l.append(("+" + r, pos + f))
General Comments 0
You need to be logged in to leave comments. Login now