diff hgsubversion/pushmod.py @ 1555:cff81f35b31e

cleanup: reference Abort from mercurial.error instead of mercurial.util It's been there since hg 1.7 or so, which lets us avoid any need for compat shims.
author Augie Fackler <raf@durin42.com>
date Sat, 24 Mar 2018 16:39:30 -0400
parents 46523cdfd3b0
children ae572c9be4e6
line wrap: on
line diff
--- a/hgsubversion/pushmod.py
+++ b/hgsubversion/pushmod.py
@@ -1,3 +1,4 @@
+from mercurial import error as hgerror
 from mercurial import util as hgutil
 
 import svnwrap
@@ -208,11 +209,11 @@ def commit(ui, repo, rev_ctx, meta, base
         if len(e.args) > 0 and e.args[1] in (svnwrap.ERR_FS_TXN_OUT_OF_DATE,
                                              svnwrap.ERR_FS_CONFLICT,
                                              svnwrap.ERR_FS_ALREADY_EXISTS):
-            raise hgutil.Abort('Outgoing changesets parent is not at '
+            raise hgerror.Abort('Outgoing changesets parent is not at '
                                'subversion HEAD\n'
                                '(pull again and rebase on a newer revision)')
         elif len(e.args) > 0 and e.args[1] == svnwrap.ERR_REPOS_HOOK_FAILURE:
             # Special handling for svn hooks blocking error
-            raise hgutil.Abort(e.args[0])
+            raise hgerror.Abort(e.args[0])
         else:
             raise