comparison mercurial/templatefilters.py @ 9029:0001e49f1c11

compat: use // for integer division
author Alejandro Santos <alejolp@alejolp.com>
date Sun, 05 Jul 2009 11:00:44 +0200
parents 3d53820381cb
children 31177742f54a
comparison
equal deleted inserted replaced
9028:bea567ae3ff6 9029:0001e49f1c11
39 if then > now: 39 if then > now:
40 return 'in the future' 40 return 'in the future'
41 41
42 delta = max(1, int(now - then)) 42 delta = max(1, int(now - then))
43 for t, s in agescales: 43 for t, s in agescales:
44 n = delta / s 44 n = delta // s
45 if n >= 2 or s == 1: 45 if n >= 2 or s == 1:
46 return fmt(t, n) 46 return fmt(t, n)
47 47
48 para_re = None 48 para_re = None
49 space_re = None 49 space_re = None