match: fix subtle error in _buildmatch stable
authorSteve Borho <steve@borho.org>
Fri, 18 Feb 2011 10:28:20 -0600
branchstable
changeset 13441 b366a5e021c6
parent 13440 286a3720d472
child 13442 bb107a31820e
match: fix subtle error in _buildmatch The trailing comma was causing a ValueError. See https://bitbucket.org/tortoisehg/thg/issue/132
mercurial/match.py
--- a/mercurial/match.py	Fri Feb 18 23:41:13 2011 +0100
+++ b/mercurial/match.py	Fri Feb 18 10:28:20 2011 -0600
@@ -254,7 +254,7 @@
         l = len(pats)
         if l < 2:
             raise
-        pata, a = _buildmatch(pats[:l//2], tail),
+        pata, a = _buildmatch(pats[:l//2], tail)
         patb, b = _buildmatch(pats[l//2:], tail)
         return pat, lambda s: a(s) or b(s)
     except re.error: