/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/git/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""An adapter between a Git Repository and a Bazaar Branch"""
19
19
 
 
20
from __future__ import absolute_import
 
21
 
20
22
from .. import (
21
23
    check,
22
24
    errors,
32
34
from ..foreign import (
33
35
    ForeignRepository,
34
36
    )
 
37
from ..sixish import (
 
38
    viewitems,
 
39
    viewvalues,
 
40
    )
35
41
 
36
42
from .filegraph import (
37
43
    GitFileLastChangeScanner,
101
107
for optimiser in ['InterRemoteGitNonGitRepository',
102
108
                  'InterLocalGitNonGitRepository',
103
109
                  'InterLocalGitLocalGitRepository',
104
 
                  'InterLocalGitRemoteGitRepository',
105
110
                  'InterRemoteGitLocalGitRepository',
106
111
                  'InterToLocalGitRepository',
107
112
                  'InterToRemoteGitRepository',
285
290
        for (file_id, revision_id, identifier) in desired_files:
286
291
            per_revision.setdefault(revision_id, []).append(
287
292
                (file_id, identifier))
288
 
        for revid, files in per_revision.items():
 
293
        for revid, files in viewitems(per_revision):
289
294
            try:
290
295
                (commit_id, mapping) = self.lookup_bzr_revision_id(revid)
291
296
            except errors.NoSuchRevision:
397
402
                    this_parent_map[revid] = parents
398
403
            parent_map.update(this_parent_map)
399
404
            pending = set()
400
 
            for values in this_parent_map.values():
 
405
            for values in viewvalues(this_parent_map):
401
406
                pending.update(values)
402
407
            pending = pending.difference(parent_map)
403
408
        return _mod_graph.KnownGraph(parent_map)