equal
deleted
inserted
replaced
34 |
34 |
35 def sendfile(self, filename, hash): |
35 def sendfile(self, filename, hash): |
36 self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash)) |
36 self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash)) |
37 fd = None |
37 fd = None |
38 try: |
38 try: |
39 try: |
39 fd = lfutil.httpsendfile(self.ui, filename) |
40 fd = lfutil.httpsendfile(self.ui, filename) |
|
41 except IOError, e: |
|
42 raise util.Abort( |
|
43 _('remotestore: could not open file %s: %s') |
|
44 % (filename, str(e))) |
|
45 return self._put(hash, fd) |
40 return self._put(hash, fd) |
|
41 except IOError, e: |
|
42 raise util.Abort( |
|
43 _('remotestore: could not open file %s: %s') |
|
44 % (filename, str(e))) |
46 finally: |
45 finally: |
47 if fd: |
46 if fd: |
48 fd.close() |
47 fd.close() |
49 |
48 |
50 def _getfile(self, tmpfile, filename, hash): |
49 def _getfile(self, tmpfile, filename, hash): |