diff -r 800ec7c048b0 -r 032c4c2f802a hgext/largefiles/remotestore.py --- a/hgext/largefiles/remotestore.py Thu Apr 07 00:05:48 2016 +0000 +++ b/hgext/largefiles/remotestore.py Wed Apr 06 23:22:12 2016 +0000 @@ -6,11 +6,12 @@ '''remote largefile store; the base class for wirestore''' -import urllib2 - from mercurial import util, wireproto, error from mercurial.i18n import _ +urlerr = util.urlerr +urlreq = util.urlreq + import lfutil import basestore @@ -49,11 +50,11 @@ def _getfile(self, tmpfile, filename, hash): try: chunks = self._get(hash) - except urllib2.HTTPError as e: + except urlerr.httperror as e: # 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: + except urlerr.urlerror as e: # This usually indicates a connection problem, so don't # keep trying with the other files... they will probably # all fail too.