/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: 2019-05-20 03:57:29 UTC
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190520035729-9rxvefxkvbbivygy
use default_user_agent function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
 
51
51
class RevisionSpec_git(RevisionSpec):
52
 
    """Selects a revision using a Git commit SHA1."""
53
 
 
54
 
    help_txt = """Selects a revision using a Git commit SHA1.
55
 
 
56
 
    Selects a revision using a Git commit SHA1, short or long.
57
 
 
58
 
    This works for both native Git repositories and Git revisions
59
 
    imported into Bazaar repositories.
 
52
    """Selects a revision using a Subversion revision number."""
 
53
 
 
54
    help_txt = """Selects a revision using a Git revision sha1.
60
55
    """
61
56
 
62
57
    prefix = 'git:'
112
107
    def _match_on(self, branch, revs):
113
108
        loc = self.spec.find(':')
114
109
        git_sha1 = self.spec[loc + 1:].encode("utf-8")
115
 
        if (len(git_sha1) > 40 or len(git_sha1) < 4 or
116
 
                not valid_git_sha1(git_sha1)):
 
110
        if len(git_sha1) > 40 or not valid_git_sha1(git_sha1):
117
111
            raise InvalidRevisionSpec(self.user_spec, branch)
118
112
        from . import (
119
113
            lazy_check_versions,