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

  • Committer: Jelmer Vernooij
  • Date: 2018-07-02 20:37:44 UTC
  • mfrom: (7025 work)
  • mto: This revision was merged to the branch mainline in revision 7027.
  • Revision ID: jelmer@jelmer.uk-20180702203744-3i0bimk0r5pfzjzl
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
from .urls import git_url_to_bzr_url
80
80
 
81
81
from ...foreign import ForeignBranch
 
82
from ...sixish import viewitems
82
83
 
83
84
 
84
85
class GitPullResult(branch.PullResult):
85
86
    """Result of a pull from a Git branch."""
86
87
 
87
88
    def _lookup_revno(self, revid):
88
 
        if type(revid) is not str:
 
89
        if not isinstance(revid, bytes):
89
90
            raise TypeError(revid)
90
91
        # Try in source branch first, it'll be faster
91
92
        with self.target_branch.lock_read():
723
724
 
724
725
 
725
726
def _quick_lookup_revno(local_branch, remote_branch, revid):
726
 
    if type(revid) is not str:
 
727
    if not isinstance(revid, bytes):
727
728
        raise TypeError(revid)
728
729
    # Try in source branch first, it'll be faster
729
730
    with local_branch.lock_read():
1155
1156
            (stop_revno, stop_revision) = self.source.last_revision_info()
1156
1157
        else:
1157
1158
            stop_revno = self.source.revision_id_to_revno(stop_revision)
1158
 
        if type(stop_revision) is not str:
 
1159
        if not isinstance(stop_revision, bytes):
1159
1160
            raise TypeError(stop_revision)
1160
1161
        main_ref = self.target.ref
1161
1162
        refs = { main_ref: (None, stop_revision) }