[PATCH STABLE] match: fix subtle error in _buildmatch
Steve Borho
steve at borho.org
Fri Feb 18 16:28:38 UTC 2011
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1298046500 21600
# Branch stable
# Node ID f1a9048fcf068377a2448394aa31def8a05a3aa8
# Parent 6169493ac3f9392ffb1adbfed6e8e5546bf1e3ed
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 @@
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:
More information about the Mercurial-devel
mailing list