Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 5454:f2ca8d2c988f
explicitely use integer division
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 11 Oct 2007 16:19:12 +0200 |
parents | c728424d44c6 |
children | 003d1f174fe1 |
comparison
equal
deleted
inserted
replaced
5453:9d77f2b47eb7 | 5454:f2ca8d2c988f |
---|---|
482 # made it explode, so we'll divide the pattern list in two | 482 # made it explode, so we'll divide the pattern list in two |
483 # until it works | 483 # until it works |
484 l = len(pats) | 484 l = len(pats) |
485 if l < 2: | 485 if l < 2: |
486 raise | 486 raise |
487 a, b = matchfn(pats[:l/2], tail), matchfn(pats[l/2:], tail) | 487 a, b = matchfn(pats[:l//2], tail), matchfn(pats[l//2:], tail) |
488 return lambda s: a(s) or b(s) | 488 return lambda s: a(s) or b(s) |
489 except re.error: | 489 except re.error: |
490 for k, p in pats: | 490 for k, p in pats: |
491 try: | 491 try: |
492 re.compile('(?:%s)' % regex(k, p, tail)) | 492 re.compile('(?:%s)' % regex(k, p, tail)) |