comparison mercurial/match.py @ 21191:a2f4ea82d6d3 stable

match: fix NameError 'pat' on overflow of regex pattern length 'pat' was renamed to 'regex' in 9d28fd795215.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 29 Apr 2014 11:02:40 +0900
parents 00cae8a2b04e
children a4b67bf1f0a5
comparison
equal deleted inserted replaced
21190:2606e7f227f6 21191:a2f4ea82d6d3
341 l = len(kindpats) 341 l = len(kindpats)
342 if l < 2: 342 if l < 2:
343 raise 343 raise
344 regexa, a = _buildregexmatch(kindpats[:l//2], globsuffix) 344 regexa, a = _buildregexmatch(kindpats[:l//2], globsuffix)
345 regexb, b = _buildregexmatch(kindpats[l//2:], globsuffix) 345 regexb, b = _buildregexmatch(kindpats[l//2:], globsuffix)
346 return pat, lambda s: a(s) or b(s) 346 return regex, lambda s: a(s) or b(s)
347 except re.error: 347 except re.error:
348 for k, p in kindpats: 348 for k, p in kindpats:
349 try: 349 try:
350 _rematcher('(?:%s)' % _regex(k, p, globsuffix)) 350 _rematcher('(?:%s)' % _regex(k, p, globsuffix))
351 except re.error: 351 except re.error: