From patchwork Tue Apr 15 00:40:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4, of, 8, match] match: assert on the last case in _regex - mainly for documentation From: Mads Kiilerich X-Patchwork-Id: 4356 Message-Id: To: mercurial-devel@selenic.com Date: Tue, 15 Apr 2014 02:40:38 +0200 # HG changeset patch # User Mads Kiilerich # Date 1397419277 -7200 # Sun Apr 13 22:01:17 2014 +0200 # Node ID dd04203235c80e9b57ef651d62948ca4c893a5f8 # Parent a1eeacd999bf8bc79b9585a010cf22e531827bbd match: assert on the last case in _regex - mainly for documentation diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -314,6 +314,7 @@ def _regex(kind, pat, globsuffix): if pat.startswith('^'): return pat return '.*' + pat + assert kind == 'glob', kind return _globre(pat) + globsuffix def _buildmatch(ctx, kindpats, globsuffix):