[MERGE] Change the signature on VersionedFiles adapters to allow less typing and more flexability inside adapters.

John Arbash Meinel john at arbash-meinel.com
Mon Feb 16 15:25:59 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> ``VersionedFiles`` record adapters have had their signature change
> from ``(record, record.get_bytes_as(record.storage_kind))`` to
> ``(record)`` reducing excess duplication and allowing adapters
> to access private data in record to obtain content more
> efficiently. (Robert Collins)
> 
> This reduces friction showing up in the
> versionedfiles-for-network-streaming project I am working on with
> Andrew.
> 
> -Rob
> 

Would it be reasonable to do this in a more backwards compatible fashion
by doing:


- -    def get_bytes(self, factory, annotated_compressed_bytes):
+    def get_bytes(self, factory, annotated_compressed_bytes=None):
       if annotated_compressed_bytes is None:
         annotated_compressed_bytes = factory.read_bytes_as(....)

?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZhYcACgkQJdeBCYSNAAPnKACfReddC0G0xfgTpvGoXIk+k1jm
4RAAoNh6j2K/K9Ia1o34hj3KId7y/HtG
=E/UH
-----END PGP SIGNATURE-----



More information about the bazaar mailing list