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

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:19:12 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7294.
  • Revision ID: jelmer@jelmer.uk-20181116231912-e043vpq22bdkxa6q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
            )
70
70
 
71
71
        bzr_revid = getattr(branch.repository, "lookup_foreign_revision_id",
72
 
                              default_mapping.revision_id_foreign_to_bzr)(sha1)
 
72
                            default_mapping.revision_id_foreign_to_bzr)(sha1)
73
73
        try:
74
74
            if branch.repository.has_revision(bzr_revid):
75
75
                return RevisionInfo.from_revision_id(branch, bzr_revid)
109
109
 
110
110
    def _match_on(self, branch, revs):
111
111
        loc = self.spec.find(':')
112
 
        git_sha1 = self.spec[loc+1:].encode("utf-8")
 
112
        git_sha1 = self.spec[loc + 1:].encode("utf-8")
113
113
        if len(git_sha1) > 40 or not valid_git_sha1(git_sha1):
114
114
            raise InvalidRevisionSpec(self.user_spec, branch)
115
115
        from . import (