[MERGE] Btree repo again, better parent and thus diff
Robert Collins
robertc at robertcollins.net
Sat Sep 27 23:42:10 BST 2008
On Sat, 2008-09-27 at 11:26 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> def __init__(self, upload_transport, index_transport, pack_transport,
> - - upload_suffix='', file_mode=None):
> + upload_suffix='', file_mode=None, index_builder_class=None,
> + index_class=None):
> """Create a NewPack instance.
>
>
> ^- Do we want to make these strictly required? For compatibility we
> could say "if None: use_old_version".
I think it catches uses that haven't updated more strongly, and as you
can see there are few such places in the core code; I expect even less
in plugins (and TBH, to have written those plugins :P).
...
>
> @@ -1536,7 +1554,7 @@
> """
> self.lock_names()
> try:
> - - builder = GraphIndexBuilder()
> + builder = self._index_builder_class()
> # load the disk nodes across
> disk_nodes = set()
> for index, key, value in self._iter_disk_pack_index():
> @@ -1608,7 +1626,9 @@
>
> ^- This is during "save_pack_names()" the old code directly used
> GraphIndexBuilder, rather than InMemoryGraphIndex.
>
> You no longer ever refer to GraphIndexBuilder in this file. Is there any
> reason to use GIBuilder rather than IMGI?
There is a slight conceptual difference, but for this code any overhead
the IMGI adds of GIB is inconsequential - the names list is tiny.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080928/d088282c/attachment.pgp
More information about the bazaar
mailing list