diff -r d51c658d3f04 -r 56b2bcea2529 hgext/largefiles/remotestore.py --- a/hgext/largefiles/remotestore.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/largefiles/remotestore.py Thu Oct 08 12:55:45 2015 -0700 @@ -8,7 +8,7 @@ import urllib2 -from mercurial import util, wireproto +from mercurial import util, wireproto, error from mercurial.i18n import _ import lfutil @@ -21,7 +21,7 @@ def put(self, source, hash): if self.sendfile(source, hash): - raise util.Abort( + raise error.Abort( _('remotestore: could not put %s to remote store %s') % (source, util.hidepassword(self.url))) self.ui.debug( @@ -39,7 +39,7 @@ fd = lfutil.httpsendfile(self.ui, filename) return self._put(hash, fd) except IOError as e: - raise util.Abort( + raise error.Abort( _('remotestore: could not open file %s: %s') % (filename, str(e))) finally: @@ -50,14 +50,14 @@ try: chunks = self._get(hash) except urllib2.HTTPError as e: - # 401s get converted to util.Aborts; everything else is fine being + # 401s get converted to error.Aborts; everything else is fine being # turned into a StoreError raise basestore.StoreError(filename, hash, self.url, str(e)) except urllib2.URLError as e: # This usually indicates a connection problem, so don't # keep trying with the other files... they will probably # all fail too. - raise util.Abort('%s: %s' % + raise error.Abort('%s: %s' % (util.hidepassword(self.url), e.reason)) except IOError as e: raise basestore.StoreError(filename, hash, self.url, str(e))