/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/repofmt/groupcompress_repo.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:06:46 UTC
  • mfrom: (6673 work)
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610000646-xj6jh277lo4xuo10
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
from ..vf_repository import (
59
59
    StreamSource,
60
60
    )
 
61
from ..sixish import (
 
62
    viewitems,
 
63
    viewvalues,
 
64
    )
61
65
from ..static_tuple import StaticTuple
62
66
 
63
67
 
276
280
                remaining_keys.difference_update(cur_keys)
277
281
                next_keys = set()
278
282
                def handle_internal_node(node):
279
 
                    for prefix, value in node._items.iteritems():
 
283
                    for prefix, value in viewitems(node._items):
280
284
                        # We don't want to request the same key twice, and we
281
285
                        # want to order it by the first time it is seen.
282
286
                        # Even further, we don't want to request a key which is
543
547
        ancestor_keys = revision_vf.get_parent_map(revision_vf.keys())
544
548
        # Strip keys back into revision_ids.
545
549
        ancestors = dict((k[0], tuple([p[0] for p in parents]))
546
 
                         for k, parents in ancestor_keys.iteritems())
 
550
                         for k, parents in viewitems(ancestor_keys))
547
551
        del ancestor_keys
548
552
        # TODO: _generate_text_key_index should be much cheaper to generate from
549
553
        #       a chk repository, rather than the current implementation
665
669
                if search_key_name is None:
666
670
                    # Find the name corresponding to the search_key_func
667
671
                    search_key_reg = chk_map.search_key_registry
668
 
                    for search_key_name, func in search_key_reg.iteritems():
 
672
                    for search_key_name, func in viewitems(search_key_reg):
669
673
                        if func == chk_inv.id_to_entry._search_key_func:
670
674
                            break
671
675
                canonical_inv = inventory.CHKInventory.from_inventory(
741
745
        # any present parent inventories, which may be used when calculating
742
746
        # deltas for streaming.
743
747
        all_inv_keys = set(corresponding_invs)
744
 
        for parent_inv_keys in inv_parent_map.itervalues():
 
748
        for parent_inv_keys in viewvalues(inv_parent_map):
745
749
            all_inv_keys.update(parent_inv_keys)
746
750
        # Filter out ghost parents.
747
751
        all_inv_keys.intersection_update(