diff tests/test_utility_commands.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 8410a978c650
children d55c9d0ba350
line wrap: on
line diff
--- a/tests/test_utility_commands.py
+++ b/tests/test_utility_commands.py
@@ -5,6 +5,7 @@ import unittest
 import re
 
 from hgext import rebase
+from mercurial import error as hgerror
 from mercurial import hg
 from mercurial import revlog
 from mercurial import context
@@ -132,26 +133,26 @@ class UtilityTests(test_util.TestBase):
         svncommands.updatemeta(self.ui(), self.repo, [])
 
         test_util.rmtree(self.repo.vfs.join('svn'))
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           self.repo.svnmeta)
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.info,
                           self.ui(), repo=self.repo, args=[])
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.genignore,
                           self.ui(), repo=self.repo, args=[])
 
         os.remove(self.repo.vfs.join('hgrc'))
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           self.repo.svnmeta)
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.info,
                           self.ui(), repo=self.repo, args=[])
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.genignore,
                           self.ui(), repo=self.repo, args=[])
 
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.rebuildmeta,
                           self.ui(), repo=self.repo, args=[])
 
@@ -369,7 +370,7 @@ missing file: binary3
         # rebuildmeta with original repo
         svncommands.rebuildmeta(self.ui(), repo=self.repo, args=[])
         # rebuildmeta with unrelated repo
-        self.assertRaises(hgutil.Abort,
+        self.assertRaises(hgerror.Abort,
                           svncommands.rebuildmeta,
                           self.ui(), repo=self.repo, args=[otherurl])
         # rebuildmeta --unsafe-skip-uuid-check with unrelated repo