diff hgsubversion/layouts/custom.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 118e6d31b5fc
children
line wrap: on
line diff
--- a/hgsubversion/layouts/custom.py
+++ b/hgsubversion/layouts/custom.py
@@ -6,6 +6,7 @@ want a couple of branches.
 
 
 """
+from mercurial import error as hgerror
 
 import base
 
@@ -30,12 +31,12 @@ class CustomLayout(base.BaseLayout):
             for other_svn in self.svn_to_hg:
                 if other_svn == svn_path:
                     msg = 'specified two hg branches for svn path %s: %s and %s'
-                    raise hgutil.Abort(msg % (svn_path, other_hg, hg_branch))
+                    raise hgerror.Abort(msg % (svn_path, other_hg, hg_branch))
 
                 if (other_svn.startswith(svn_path + '/') or
                     svn_path.startswith(other_svn + '/')):
                     msg = 'specified mappings for nested svn paths: %s and %s'
-                    raise hgutl.Abort(msg % (svn_path, other_svn))
+                    raise hgerror.Abort(msg % (svn_path, other_svn))
 
             self.svn_to_hg[svn_path] = hg_branch
             self.hg_to_svn[hg_branch] = svn_path