Rev 3122: finish polishing up the sftp code. in http://bzr.arbash-meinel.com/branches/bzr/1.1-dev/sftp_chunked
John Arbash Meinel
john at arbash-meinel.com
Mon Dec 17 23:41:14 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/1.1-dev/sftp_chunked
------------------------------------------------------------
revno: 3122
revision-id:john at arbash-meinel.com-20071217233848-pq8zo3fyr9yt1rc1
parent: john at arbash-meinel.com-20071217165633-unoib2xwcy3moixw
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: sftp_chunked
timestamp: Mon 2007-12-17 17:38:48 -0600
message:
finish polishing up the sftp code.
modified:
bzrlib/transport/sftp.py sftp.py-20051019050329-ab48ce71b7e32dfe
-------------- next part --------------
=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py 2007-12-17 16:56:33 +0000
+++ b/bzrlib/transport/sftp.py 2007-12-17 23:38:48 +0000
@@ -395,6 +395,7 @@
cur_offset_and_size = offset_stack.next()
else:
data_map[key] = data
+ cur_coalesced.ranges = new_ranges
# Now that we've read some data, see if we can yield anything back
while cur_offset_and_size in data_map:
@@ -408,13 +409,18 @@
cur_coalesced = cur_coalesced_stack.next()
except StopIteration:
cur_coalesced = None
+ if buffered_data:
+ # Why do we have buffered data left
+ import pdb; pdb.set_trace()
+ buffered_data = ''
+ buffered_start = cur_coalesced.start
elif buffered_end >= cur_coalesced.start + cur_coalesced.length:
raise AssertionError('Somehow we read too much data: %s > %s'
% (buffered_end, cur_coalesced.start + cur_coalesced.length))
if cur_coalesced is not None:
raise errors.ShortReadvError(relpath, cur_coalesced.start,
- cur_coalesced.length, len(data))
+ cur_coalesced.length, len(buffered_data))
def put_file(self, relpath, f, mode=None):
"""
More information about the bazaar-commits
mailing list