comparison mercurial/match.py @ 14722:b6dc362b051c stable

match: fix bug caused by refactoring in cfc89398f710
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Thu, 23 Jun 2011 14:40:57 +0200
parents cfc89398f710
children d5f774668102
comparison
equal deleted inserted replaced
14721:4fcde634f5e0 14722:b6dc362b051c
280 # made it explode, so we'll divide the pattern list in two 280 # made it explode, so we'll divide the pattern list in two
281 # until it works 281 # until it works
282 l = len(pats) 282 l = len(pats)
283 if l < 2: 283 if l < 2:
284 raise 284 raise
285 pata, a = _buildmatch(pats[:l//2], tail) 285 pata, a = _buildregexmatch(pats[:l//2], tail)
286 patb, b = _buildmatch(pats[l//2:], tail) 286 patb, b = _buildregexmatch(pats[l//2:], tail)
287 return pat, lambda s: a(s) or b(s) 287 return pat, lambda s: a(s) or b(s)
288 except re.error: 288 except re.error:
289 for k, p in pats: 289 for k, p in pats:
290 try: 290 try:
291 re.compile('(?:%s)' % _regex(k, p, tail)) 291 re.compile('(?:%s)' % _regex(k, p, tail))