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

  • Committer: Jelmer Vernooij
  • Date: 2017-06-05 22:01:28 UTC
  • mfrom: (6658 work)
  • mto: This revision was merged to the branch mainline in revision 6666.
  • Revision ID: jelmer@jelmer.uk-20170605220128-xurjonb8cjf5o52j
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
from .branch import Branch
57
57
from .controldir import ControlDir
58
58
from .revision import NULL_REVISION
 
59
from .sixish import (
 
60
    viewitems,
 
61
    )
59
62
from .trace import note
60
63
from .workingtree import WorkingTree
61
64
from .i18n import gettext
128
131
                # landing].
129
132
                distances = set()
130
133
                existences = set()
131
 
                for ref, wantlist in callback_refs.iteritems():
 
134
                for ref, wantlist in viewitems(callback_refs):
132
135
                    wanting_items.update(wantlist)
133
136
                    kind, value = ref
134
137
                    if kind == 'trees':
141
144
                        raise AssertionError(
142
145
                            'unknown ref kind for ref %s' % ref)
143
146
                node_distances = repo.get_graph().find_lefthand_distances(distances)
144
 
                for key, distance in node_distances.iteritems():
 
147
                for key, distance in viewitems(node_distances):
145
148
                    refs[('lefthand-distance', key)] = distance
146
149
                    if key in existences and distance > 0:
147
150
                        refs[('revision-existence', key)] = True
229
232
            note(gettext('%6d revisions missing parents in ancestry'),
230
233
                 len(self.missing_parent_links))
231
234
            if verbose:
232
 
                for link, linkers in self.missing_parent_links.items():
 
235
                for link, linkers in viewitems(self.missing_parent_links):
233
236
                    note(gettext('      %s should be in the ancestry for:'), link)
234
237
                    for linker in linkers:
235
238
                        note('       * %s', linker)
320
323
                text_key_references=self.text_key_references,
321
324
                ancestors=self.ancestors)
322
325
        storebar.update('file-graph', 1)
323
 
        result = weave_checker.check_file_version_parents(
 
326
        wrongs, unused_versions = weave_checker.check_file_version_parents(
324
327
            self.repository.texts)
325
328
        self.checked_weaves = weave_checker.file_ids
326
 
        bad_parents, unused_versions = result
327
 
        bad_parents = bad_parents.items()
328
 
        for text_key, (stored_parents, correct_parents) in bad_parents:
 
329
        for text_key, (stored_parents, correct_parents) in viewitems(wrongs):
329
330
            # XXX not ready for id join/split operations.
330
331
            weave_id = text_key[0]
331
332
            revision_id = text_key[-1]