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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-03 03:20:44 UTC
  • mfrom: (7018.3.10 git-fixes)
  • Revision ID: breezy.the.bot@gmail.com-20180703032044-t5a5w5y0tmzrbezc
Port a few more bits of the git plugin to python 3.

Merged from https://code.launchpad.net/~jelmer/brz/git-fixes2/+merge/348803

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from ...foreign import (
36
36
    ForeignRepository,
37
37
    )
 
38
from ...sixish import viewvalues
38
39
 
39
40
from .commit import (
40
41
    GitCommitBuilder,
430
431
                    this_parent_map[revid] = parents
431
432
            parent_map.update(this_parent_map)
432
433
            pending = set()
433
 
            map(pending.update, this_parent_map.itervalues())
 
434
            map(pending.update, viewvalues(this_parent_map))
434
435
            pending = pending.difference(parent_map)
435
436
        return _mod_graph.KnownGraph(parent_map)
436
437
 
460
461
        :raise KeyError: If foreign revision was not found
461
462
        :return: bzr revision id
462
463
        """
463
 
        if type(foreign_revid) is not str:
 
464
        if not isinstance(foreign_revid, bytes):
464
465
            raise TypeError(foreign_revid)
465
466
        if mapping is None:
466
467
            mapping = self.get_mapping()
550
551
            return (git_sha, mapping)
551
552
 
552
553
    def get_revision(self, revision_id):
553
 
        if not isinstance(revision_id, str):
 
554
        if not isinstance(revision_id, bytes):
554
555
            raise errors.InvalidRevisionId(revision_id, self)
555
556
        git_commit_id, mapping = self.lookup_bzr_revision_id(revision_id)
556
557
        try: