match: use ProgrammingError where appropriate
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 23 May 2017 08:49:01 -0700
changeset 32444 57d6c0c74b1b
parent 32443 34e9b8b94f66
child 32445 847233374434
match: use ProgrammingError where appropriate
mercurial/match.py
--- a/mercurial/match.py	Tue May 23 01:30:36 2017 +0530
+++ b/mercurial/match.py	Tue May 23 08:49:01 2017 -0700
@@ -38,7 +38,8 @@
     for kind, pat, source in kindpats:
         if kind == 'set':
             if not ctx:
-                raise error.Abort(_("fileset expression with no context"))
+                raise error.ProgrammingError("fileset expression with no "
+                                             "context")
             s = ctx.getfileset(pat)
             fset.update(s)
 
@@ -121,8 +122,8 @@
     normalize = _donormalize
     if icasefs:
         if exact:
-            raise error.Abort(_("a case-insensitive exact matcher doesn't "
-                                "make sense"))
+            raise error.ProgrammingError("a case-insensitive exact matcher "
+                                         "doesn't make sense")
         dirstate = ctx.repo().dirstate
         dsnormalize = dirstate.normalize