diff hgext/share.py @ 27227:56b2bcea2529

error: get Abort from 'error' instead of 'util' The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 08 Oct 2015 12:55:45 -0700
parents bf3d10f0c34a
children a7eecd021782
line wrap: on
line diff
--- a/hgext/share.py
+++ b/hgext/share.py
@@ -38,7 +38,7 @@
 '''
 
 from mercurial.i18n import _
-from mercurial import cmdutil, commands, hg, util, extensions, bookmarks
+from mercurial import cmdutil, commands, hg, util, extensions, bookmarks, error
 from mercurial.hg import repository, parseurl
 import errno
 
@@ -83,7 +83,7 @@
     """
 
     if not repo.shared():
-        raise util.Abort(_("this is not a shared repo"))
+        raise error.Abort(_("this is not a shared repo"))
 
     destlock = lock = None
     lock = repo.lock()