At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/sftp_chunked
------------------------------------------------------------
revno: 3695
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: sftp_chunked
timestamp: Wed 2008-09-10 14:14:43 -0500
message:
Overlapping ranges are not allowed anymore.
=== 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
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits