# HG changeset patch # User Martin von Zweigbergk # Date 1495554541 25200 # Node ID 57d6c0c74b1bbc83e9a511a4a1fa8b57e2457046 # Parent 34e9b8b94f66db7ebe366f67cea7b64bd0ec6968 match: use ProgrammingError where appropriate diff -r 34e9b8b94f66 -r 57d6c0c74b1b 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