/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/check.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
from ..branch import Branch
56
56
from ..check import Check
57
57
from ..revision import NULL_REVISION
58
 
from ..sixish import (
59
 
    viewitems,
60
 
    )
61
58
from ..trace import note
62
59
from ..workingtree import WorkingTree
63
60
from ..i18n import gettext
119
116
                # landing].
120
117
                distances = set()
121
118
                existences = set()
122
 
                for ref, wantlist in viewitems(callback_refs):
 
119
                for ref, wantlist in callback_refs.items():
123
120
                    wanting_items.update(wantlist)
124
121
                    kind, value = ref
125
122
                    if kind == 'trees':
132
129
                        raise AssertionError(
133
130
                            'unknown ref kind for ref %s' % ref)
134
131
                node_distances = repo.get_graph().find_lefthand_distances(distances)
135
 
                for key, distance in viewitems(node_distances):
 
132
                for key, distance in node_distances.items():
136
133
                    refs[('lefthand-distance', key)] = distance
137
134
                    if key in existences and distance > 0:
138
135
                        refs[('revision-existence', key)] = True
218
215
            note(gettext('%6d revisions missing parents in ancestry'),
219
216
                 len(self.missing_parent_links))
220
217
            if verbose:
221
 
                for link, linkers in viewitems(self.missing_parent_links):
 
218
                for link, linkers in self.missing_parent_links.items():
222
219
                    note(gettext('      %s should be in the ancestry for:'),
223
220
                         link.decode('utf-8'))
224
221
                    for linker in linkers:
314
311
        wrongs, unused_versions = weave_checker.check_file_version_parents(
315
312
            self.repository.texts)
316
313
        self.checked_weaves = weave_checker.file_ids
317
 
        for text_key, (stored_parents, correct_parents) in viewitems(wrongs):
 
314
        for text_key, (stored_parents, correct_parents) in wrongs.items():
318
315
            # XXX not ready for id join/split operations.
319
316
            weave_id = text_key[0]
320
317
            revision_id = text_key[-1]