--- a/hgext/largefiles/proto.py Thu Apr 07 00:05:48 2016 +0000
+++ b/hgext/largefiles/proto.py Wed Apr 06 23:22:12 2016 +0000
@@ -4,12 +4,14 @@
# GNU General Public License version 2 or any later version.
import os
-import urllib2
import re
from mercurial import error, httppeer, util, wireproto
from mercurial.i18n import _
+urlerr = util.urlerr
+urlreq = util.urlreq
+
import lfutil
LARGEFILES_REQUIRED_MSG = ('\nThis repository uses the largefiles extension.'
@@ -140,7 +142,7 @@
yield result, f
try:
yield int(f.value)
- except (ValueError, urllib2.HTTPError):
+ except (ValueError, urlerr.httperror):
# If the server returns anything but an integer followed by a
# newline, newline, it's not speaking our language; if we get
# an HTTP error, we can't be sure the largefile is present;