[CHK/MERGE/RFC] Updates to fetch and node layout

John Arbash Meinel john at arbash-meinel.com
Sun Nov 16 21:09:48 GMT 2008


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

Robert Collins wrote:
> On Sun, 2008-11-16 at 14:40 -0600, John Arbash Meinel wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> And, of course, it is always better when you attach things :)
> 
> Looks good to me. I don't understand how copy_to will help
> from_inventory though.
> 
> Because, from_inventory() should *only* ever be getting called with a
> 'Inventory' not a CHKInventory.
> 
> -Rob

Well, at the moment it is called during fetch because we use the loop:

            if (self.from_repository._format.supports_chks or
                self.to_repository._format.supports_chks):
                # Hack to make chk->chk fetch: copy the inventories as
                # inventories.
                total = len(revs)
                for pos, inv in enumerate(
                    self.from_repository.iter_inventories(revs)):
                    pb.update("Copying inventories", pos, total)
                    self.to_repository.add_inventory(inv.revision_id,
inv, [])


Which is also true when *both* are CHKRepositories.

Certainly that code will eventually change, and I don't really know what
the overall purpose of CHKInventory.from_inventory() is. If it really is
going to be only for from a regular Inventory, then I'm fine removing it.

John
=:->

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

iEYEARECAAYFAkkgjBwACgkQJdeBCYSNAANLRQCfY6vykubkRrJgCOxIBm1+J4XT
OawAoLdHKDCmgAkFoM4HH4z1zTeQU3u3
=ZfPC
-----END PGP SIGNATURE-----



More information about the bazaar mailing list