topic: get 'Abort' from error, not 'util'
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 14 Mar 2016 17:09:02 +0000
changeset 1894 f8ee36489d3c
parent 1893 9d1157fcdc6c
child 1895 c8e4c6e03957
topic: get 'Abort' from error, not 'util' The class live in 'mercurial.error'.
src/topic/__init__.py
--- a/src/topic/__init__.py	Mon Mar 14 21:22:56 2016 -0400
+++ b/src/topic/__init__.py	Mon Mar 14 17:09:02 2016 +0000
@@ -170,11 +170,11 @@
     """View current topic, set current topic, or see all topics."""
     if change:
         if not obsolete.isenabled(repo, obsolete.createmarkersopt):
-            raise util.Abort(_('must have obsolete enabled to use --change'))
+            raise error.Abort(_('must have obsolete enabled to use --change'))
         if not topic and not clear:
-            raise util.Abort('changing topic requires a topic name or --clear')
+            raise error.Abort('changing topic requires a topic name or --clear')
         if any(not c.mutable() for c in repo.set('%r and public()', change)):
-            raise util.Abort("can't change topic of a public change")
+            raise error.Abort("can't change topic of a public change")
         rewrote = 0
         needevolve = False
         l = repo.lock()