##// END OF EJS Templates
match: fix NameError 'pat' on overflow of regex pattern length...
Yuya Nishihara -
r21191:a2f4ea82 stable
parent child Browse files
Show More
@@ -343,7 +343,7 b' def _buildregexmatch(kindpats, globsuffi'
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:
@@ -331,3 +331,14 b' Test listfile and listfile0'
331 f mammals/skunk mammals/skunk exact
331 f mammals/skunk mammals/skunk exact
332
332
333 $ cd ..
333 $ cd ..
334
335 Test split patterns on overflow
336
337 $ cd t
338 $ echo fennel > overflow.list
339 $ python -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list
340 $ echo fenugreek >> overflow.list
341 $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -v '^xxx'
342 f fennel fennel exact
343 f fenugreek fenugreek exact
344 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now