Patchwork D2777: wireproto: raise ProgrammingError instead of Abort

login
register
mail settings
Submitter phabricator
Date March 11, 2018, 7:45 a.m.
Message ID <f8be6ea4b12fb829b02cead2082d26e5@localhost.localdomain>
Download mbox | patch
Permalink /patch/29300/
State Not Applicable
Headers show

Comments

phabricator - March 11, 2018, 7:45 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGef68493d652b: wireproto: raise ProgrammingError instead of Abort (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2777?vs=6823&id=6867

REVISION DETAIL
  https://phab.mercurial-scm.org/D2777

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -704,12 +704,13 @@ 
         transports = {k for k, v in wireprototypes.TRANSPORTS.items()
                       if v['version'] == 2}
     else:
-        raise error.Abort(_('invalid transport policy value: %s') %
-                          transportpolicy)
+        raise error.ProgrammingError('invalid transport policy value: %s' %
+                                     transportpolicy)
 
     if permission not in ('push', 'pull'):
-        raise error.Abort(_('invalid wire protocol permission; got %s; '
-                            'expected "push" or "pull"') % permission)
+        raise error.ProgrammingError('invalid wire protocol permission; '
+                                     'got %s; expected "push" or "pull"' %
+                                     permission)
 
     def register(func):
         commands[name] = commandentry(func, args=args, transports=transports,