diff tests/test_push_command.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_push_command.py
+++ b/tests/test_push_command.py
@@ -12,6 +12,7 @@ import unittest
 
 from mercurial import context
 from mercurial import commands
+from mercurial import error as hgerror
 from mercurial import hg
 from mercurial import node
 from mercurial import revlog
@@ -102,7 +103,7 @@ class PushTests(test_util.TestBase):
         old_tip = repo['tip'].node()
         try:
           self.pushrevisions()
-        except hgutil.Abort, e:
+        except hgerror.Abort, e:
           assert "pull again and rebase" in str(e)
         tip = self.repo['tip']
         self.assertEqual(tip.node(), old_tip)
@@ -131,7 +132,7 @@ class PushTests(test_util.TestBase):
         repo.wwrite('beta', 'something else', '')
         try:
             self.pushrevisions()
-        except hgutil.Abort:
+        except hgerror.Abort:
             pass
         tip = self.repo['tip']
         self.assertEqual(new_hash, tip.node())
@@ -657,7 +658,7 @@ class PushTests(test_util.TestBase):
         try:
             self.pushrevisions()
             assert False, 'This should have aborted!'
-        except hgutil.Abort, e:
+        except hgerror.Abort, e:
             self.assertEqual(e.args[0],
                              'Outgoing changesets parent is not at subversion '
                              'HEAD\n'