Robert Collins wrote:
> John - that code uses None to mean 'copy all items'. Remember that Packer /had/ two use cases:
> - fetch by making a pack
> - packing
>
> When doing a pack, self._revision_keys is None, and all inventories are
> preserved (in knit-style pack repos). When fetching by making a pack, we
> want to copy only those revisions.
>
> This is essentially dead code now though, as we no longer fetch using
> packer, do we?
>
We no longer fetch using Packer, correct.
This code *is* used during pack operations (bzr pack and autopack)
I'll admit to not tracing to see for sure that _revision_keys was None,
and you could be right.
I can say that GCPacker does *not* work that way:
def _copy_revision_texts(self):
source_vf, target_vf = self._build_vfs('revision', True, False)
if not self.revision_keys:
# We are doing a full fetch, aka 'pack' self.revision_keys = source_vf.keys()
So self.revision_keys is always filled out.
We *can* change the inventory code to be:
def _copy_inventory_texts(self):
source_vf, target_vf = self._build_vfs('inventory', True, True) self._copy_stream(source_vf, target_vf, self.revision_keys, 'inventories', self._get_filtered_inv_stream, 2)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> John - that code uses None to mean 'copy all items'. Remember that Packer /had/ two use cases:
> - fetch by making a pack
> - packing
>
> When doing a pack, self._revision_keys is None, and all inventories are
> preserved (in knit-style pack repos). When fetching by making a pack, we
> want to copy only those revisions.
>
> This is essentially dead code now though, as we no longer fetch using
> packer, do we?
>
We no longer fetch using Packer, correct.
This code *is* used during pack operations (bzr pack and autopack)
I'll admit to not tracing to see for sure that _revision_keys was None,
and you could be right.
I can say that GCPacker does *not* work that way: texts(self) : vfs('revision' , True, False)
self. revision_ keys = source_vf.keys()
def _copy_revision_
source_vf, target_vf = self._build_
if not self.revision_keys:
# We are doing a full fetch, aka 'pack'
So self.revision_keys is always filled out.
We *can* change the inventory code to be: _texts( self): vfs('inventory' , True, True)
self._ copy_stream( source_ vf, target_vf, self.revision_keys,
'inventori es', self._get_ filtered_ inv_stream, 2)
def _copy_inventory
source_vf, target_vf = self._build_
=>
def _copy_inventory _texts( self): vfs('inventory' , True, True)
self._ copy_stream( source_ vf, target_vf, inv_keys,
'inventori es', self._get_ filtered_ inv_stream, 2)
source_vf, target_vf = self._build_
inv_keys = source_vf.keys()
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq CItgACgkQJdeBCY SNAAMOogCg0PpOf iFBRh5o7VERYVni 1kYv ocGkfszd3jUP9DB yn
MXwAoMZaI0m0BZ2
=Z2fe
-----END PGP SIGNATURE-----