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

  • Committer: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
    )
245
245
from .sixish import (
246
246
    range,
 
247
    viewitems,
 
248
    viewvalues,
247
249
    )
248
250
 
249
251
 
975
977
            # Directories that need to be read
976
978
            pending_dirs = set()
977
979
            paths_to_search = set()
978
 
            for entry_list in newly_found.itervalues():
 
980
            for entry_list in viewvalues(newly_found):
979
981
                for dir_name_id, trees_info in entry_list:
980
982
                    found[dir_name_id] = trees_info
981
983
                    found_dir_names.add(dir_name_id[:2])
1386
1388
                                               fingerprint, new_child_path)
1387
1389
        self._check_delta_ids_absent(new_ids, delta, 0)
1388
1390
        try:
1389
 
            self._apply_removals(removals.iteritems())
1390
 
            self._apply_insertions(insertions.values())
 
1391
            self._apply_removals(viewitems(removals))
 
1392
            self._apply_insertions(viewvalues(insertions))
1391
1393
            # Validate parents
1392
1394
            self._after_delta_check_parents(parents, 0)
1393
1395
        except errors.BzrError as e:
2723
2725
        # --- end generation of full tree mappings
2724
2726
 
2725
2727
        # sort and output all the entries
2726
 
        new_entries = self._sort_entries(by_path.items())
 
2728
        new_entries = self._sort_entries(viewitems(by_path))
2727
2729
        self._entries_to_current_state(new_entries)
2728
2730
        self._parents = [rev_id for rev_id, tree in trees]
2729
2731
        self._ghosts = list(ghosts)
3288
3290
                raise AssertionError(
3289
3291
                    "entry %r has no data for any tree." % (entry,))
3290
3292
        if self._id_index is not None:
3291
 
            for file_id, entry_keys in self._id_index.iteritems():
 
3293
            for file_id, entry_keys in viewitems(self._id_index):
3292
3294
                for entry_key in entry_keys:
3293
3295
                    # Check that the entry in the map is pointing to the same
3294
3296
                    # file_id