Rev 3695: Overlapping ranges are not allowed anymore. in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/sftp_chunked
John Arbash Meinel
john at arbash-meinel.com
Wed Sep 10 20:14:44 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/sftp_chunked
------------------------------------------------------------
revno: 3695
revision-id: john at arbash-meinel.com-20080910191443-1cncrx1oo6os71nm
parent: john at arbash-meinel.com-20080910173301-niz0pw3mcat430o1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: sftp_chunked
timestamp: Wed 2008-09-10 14:14:43 -0500
message:
Overlapping ranges are not allowed anymore.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_transport.py'
--- a/bzrlib/tests/test_transport.py 2008-06-19 06:57:22 +0000
+++ b/bzrlib/tests/test_transport.py 2008-09-10 19:14:43 +0000
@@ -180,10 +180,10 @@
self.check([(0, 20, [(0, 10), (10, 10)])],
[(0, 10), (10, 10)])
- # XXX: scary, http.readv() can't handle that --vila20071209
def test_coalesce_overlapped(self):
- self.check([(0, 15, [(0, 10), (5, 10)])],
- [(0, 10), (5, 10)])
+ self.assertRaises(ValueError,
+ self.check, [(0, 15, [(0, 10), (5, 10)])],
+ [(0, 10), (5, 10)])
def test_coalesce_limit(self):
self.check([(10, 50, [(0, 10), (10, 10), (20, 10),
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py 2008-09-05 21:23:34 +0000
+++ b/bzrlib/transport/__init__.py 2008-09-10 19:14:43 +0000
@@ -792,7 +792,7 @@
and (limit <= 0 or len(cur.ranges) < limit)
and (max_size <= 0 or end - cur.start <= max_size)):
if start < last_end:
- raise errors.ValueError('Overlapping range not allowed:'
+ raise ValueError('Overlapping range not allowed:'
' last range ended at %s, new one starts at %s'
% (last_end, start))
cur.length = end - cur.start
More information about the bazaar-commits
mailing list