Kiln » largefiles » largefiles-mercurial
Clone URL:  
Pushed to one repository · View In Graph Contained in mercurial/default and tip

compat: remove httpsendfile compatibility wrapper

Changeset f31e451f1baa

Parent 3d6815a46253

by Profile picture of User 521Andrew Pritchard <andrewp@fogcreek.com>

Changes to 2 files · Browse files at f31e451f1baa Showing diff from parent 3d6815a46253 Diff from another changeset...

Change 1 of 1 Show Entire File lfutil.py Stacked
 
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
 
403
404
405
 
 
 
 
 
 
 
 
 
 
 
 
406
407
408
@@ -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):
Change 1 of 2 Show Entire File remotestore.py Stacked
 
6
7
8
9
 
10
11
12
 
35
36
37
38
 
39
40
41
 
6
7
8
 
9
10
11
12
 
35
36
37
 
38
39
40
41
@@ -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')