Rev 3682: Only Z_SYNC_FLUSH when we have extra bytes. in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/btree

John Arbash Meinel john at arbash-meinel.com
Sat Aug 23 01:51:00 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/btree

------------------------------------------------------------
revno: 3682
revision-id: john at arbash-meinel.com-20080823005056-r2ccmi0zrbuvj0mb
parent: john at arbash-meinel.com-20080822211125-p9bmwrug1j4ann6d
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: btree
timestamp: Fri 2008-08-22 19:50:56 -0500
message:
  Only Z_SYNC_FLUSH when we have extra bytes.
modified:
  bzrlib/chunk_writer.py         chunk_writer.py-20080630234519-6ggn4id17nipovny-1
-------------- next part --------------
=== modified file 'bzrlib/chunk_writer.py'
--- a/bzrlib/chunk_writer.py	2008-08-22 20:50:36 +0000
+++ b/bzrlib/chunk_writer.py	2008-08-23 00:50:56 +0000
@@ -138,9 +138,8 @@
                 append(out)
         if extra_bytes:
             out = compress(extra_bytes)
-            if out:
-                append(out)
-        append(compressor.flush(Z_SYNC_FLUSH))
+            out += compressor.flush(Z_SYNC_FLUSH)
+            append(out)
         bytes_out_len = sum(map(len, bytes_out))
         return bytes_out, bytes_out_len, compressor
 



More information about the bazaar-commits mailing list