# HG changeset patch # User Steve Borho # Date 2011-02-18 16:28:20 # Node ID b366a5e021c6d8d1e3774d7829af2c0c74d2163c # Parent 286a3720d47279efe06d2a441145bde222bf5244 match: fix subtle error in _buildmatch The trailing comma was causing a ValueError. See https://bitbucket.org/tortoisehg/thg/issue/132 diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -254,7 +254,7 @@ def _buildmatch(pats, tail): 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: