/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/fetch.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:
40
40
    )
41
41
from .i18n import gettext
42
42
from .revision import NULL_REVISION
 
43
from .sixish import (
 
44
    viewvalues,
 
45
    )
43
46
from .trace import mutter
44
47
 
45
48
 
215
218
            revision_id = tree.get_file_revision(root_id, u"")
216
219
            revision_root[revision_id] = root_id
217
220
        # Find out which parents we don't already know root ids for
218
 
        parents = set()
219
 
        for revision_parents in parent_map.itervalues():
220
 
            parents.update(revision_parents)
221
 
        parents.difference_update(revision_root.keys() + [NULL_REVISION])
 
221
        parents = set(viewvalues(parent_map))
 
222
        parents.difference_update(revision_root)
 
223
        parents.discard(NULL_REVISION)
222
224
        # Limit to revisions present in the versionedfile
223
 
        parents = graph.get_parent_map(parents).keys()
 
225
        parents = graph.get_parent_map(parents)
224
226
        for tree in self.iter_rev_trees(parents):
225
227
            root_id = tree.get_root_id()
226
228
            revision_root[tree.get_revision_id()] = root_id