Changeset f31e451f1baa…
Parent 3d6815a46253…
by Andrew Pritchard <andrewp@fogcreek.com>
Changes to 2 files · Browse files at f31e451f1baa Showing diff from parent 3d6815a46253 Diff from another changeset...
@@ -403,18 +403,6 @@ h.update(chunk)
return h.hexdigest()
-def httpsendfile(ui, filename):
- try:
- # Mercurial >= 1.9
- return httpconnection.httpsendfile(ui, filename, 'rb')
- except ImportError:
- if 'ui' in inspect.getargspec(url_.httpsendfile.__init__)[0]:
- # Mercurial == 1.8
- return url_.httpsendfile(ui, filename, 'rb')
- else:
- # Mercurial <= 1.7
- return url_.httpsendfile(filename, 'rb')
-
# Convert a path to a unix style path. This is used to give a
# canonical path to the lfdirstate.
def unixpath(path):
|
@@ -6,7 +6,7 @@
'''Remote largefile store; the base class for servestore'''
-from mercurial import util
+from mercurial import httpconnection, util
from mercurial.i18n import _
import lfutil
@@ -35,7 +35,7 @@ fd = None
try:
try:
- fd = lfutil.httpsendfile(self.ui, filename)
+ fd = httpconnection.httpsendfile(self.ui, filename, 'rb')
except IOError, e:
raise util.Abort(
_('remotestore: could not open file %s: %s')
|
Loading...