At http://bzr.arbash-meinel.com/branches/bzr/1.11/get_record_stream_chunked

------------------------------------------------------------
revno: 3892
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: John Arbash Meinel <[EMAIL PROTECTED]>
branch nick: get_record_stream_chunked
timestamp: Wed 2008-12-10 18:56:16 -0600
message:
  Change the signature to report the storage kind as 'chunked'
=== modified file 'bzrlib/tests/test_versionedfile.py'
--- a/bzrlib/tests/test_versionedfile.py        2008-12-11 00:54:36 +0000
+++ b/bzrlib/tests/test_versionedfile.py        2008-12-11 00:56:16 +0000
@@ -2213,8 +2213,9 @@
         self._lines["A"] = ["FOO", "BAR"]
         it = self.texts.get_record_stream([("A",)], "unordered", True)
         record = it.next()
-        self.assertEquals("fulltext", record.storage_kind)
+        self.assertEquals("chunked", record.storage_kind)
         self.assertEquals("FOOBAR", record.get_bytes_as("fulltext"))
+        self.assertEquals(["FOO", "BAR"], record.get_bytes_as("chunked"))
 
     def test_get_record_stream_absent(self):
         it = self.texts.get_record_stream([("A",)], "unordered", True)

=== modified file 'bzrlib/versionedfile.py'
--- a/bzrlib/versionedfile.py   2008-12-11 00:54:36 +0000
+++ b/bzrlib/versionedfile.py   2008-12-11 00:56:16 +0000
@@ -95,7 +95,7 @@
 
     :ivar sha1: None, or the sha1 of the content fulltext.
     :ivar storage_kind: The native storage kind of this factory. Always
-        'fulltext' (for compatibility with clients that don't know 'chunked')
+        'chunked'
     :ivar key: The key of this content. Each key is a tuple with a single
         string in it.
     :ivar parents: A tuple of parent keys for self.key. If the object has
@@ -106,7 +106,7 @@
     def __init__(self, key, parents, sha1, chunks):
         """Create a ContentFactory."""
         self.sha1 = sha1
-        self.storage_kind = 'fulltext' #XXX: This should really be 'chunked'
+        self.storage_kind = 'chunked'
         self.key = key
         self.parents = parents
         self._chunks = chunks

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to