/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/bzr/groupcompress_repo.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Repository formats using CHK inventories and groupcompress compression."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
import time
22
20
 
23
21
from .. import (
59
57
from ..bzr.vf_repository import (
60
58
    StreamSource,
61
59
    )
62
 
from ..sixish import (
63
 
    viewitems,
64
 
    viewvalues,
65
 
    )
66
60
from ..static_tuple import StaticTuple
67
61
 
68
62
 
287
281
                next_keys = set()
288
282
 
289
283
                def handle_internal_node(node):
290
 
                    for prefix, value in viewitems(node._items):
 
284
                    for prefix, value in node._items.items():
291
285
                        # We don't want to request the same key twice, and we
292
286
                        # want to order it by the first time it is seen.
293
287
                        # Even further, we don't want to request a key which is
549
543
        ancestor_keys = revision_vf.get_parent_map(revision_vf.keys())
550
544
        # Strip keys back into revision_ids.
551
545
        ancestors = dict((k[0], tuple([p[0] for p in parents]))
552
 
                         for k, parents in viewitems(ancestor_keys))
 
546
                         for k, parents in ancestor_keys.items())
553
547
        del ancestor_keys
554
548
        # TODO: _generate_text_key_index should be much cheaper to generate from
555
549
        #       a chk repository, rather than the current implementation
671
665
                if search_key_name is None:
672
666
                    # Find the name corresponding to the search_key_func
673
667
                    search_key_reg = chk_map.search_key_registry
674
 
                    for search_key_name, func in viewitems(search_key_reg):
 
668
                    for search_key_name, func in search_key_reg.items():
675
669
                        if func == chk_inv.id_to_entry._search_key_func:
676
670
                            break
677
671
                canonical_inv = inventory.CHKInventory.from_inventory(
748
742
        # any present parent inventories, which may be used when calculating
749
743
        # deltas for streaming.
750
744
        all_inv_keys = set(corresponding_invs)
751
 
        for parent_inv_keys in viewvalues(inv_parent_map):
 
745
        for parent_inv_keys in inv_parent_map.values():
752
746
            all_inv_keys.update(parent_inv_keys)
753
747
        # Filter out ghost parents.
754
748
        all_inv_keys.intersection_update(