comparison 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
comparison
equal deleted inserted replaced
27226:d51c658d3f04 27227:56b2bcea2529
36 36
37 The default naming mode is "identity." 37 The default naming mode is "identity."
38 ''' 38 '''
39 39
40 from mercurial.i18n import _ 40 from mercurial.i18n import _
41 from mercurial import cmdutil, commands, hg, util, extensions, bookmarks 41 from mercurial import cmdutil, commands, hg, util, extensions, bookmarks, error
42 from mercurial.hg import repository, parseurl 42 from mercurial.hg import repository, parseurl
43 import errno 43 import errno
44 44
45 cmdtable = {} 45 cmdtable = {}
46 command = cmdutil.command(cmdtable) 46 command = cmdutil.command(cmdtable)
81 81
82 Copy the store data to the repo and remove the sharedpath data. 82 Copy the store data to the repo and remove the sharedpath data.
83 """ 83 """
84 84
85 if not repo.shared(): 85 if not repo.shared():
86 raise util.Abort(_("this is not a shared repo")) 86 raise error.Abort(_("this is not a shared repo"))
87 87
88 destlock = lock = None 88 destlock = lock = None
89 lock = repo.lock() 89 lock = repo.lock()
90 try: 90 try:
91 # we use locks here because if we race with commit, we 91 # we use locks here because if we race with commit, we