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

Clean up trailing whitespace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
 
31
31
def valid_git_sha1(hex):
32
 
    """Check if `hex` is a validly formatted Git SHA1.
33
 
    
34
 
    :param hex: Hex string to validate
35
 
    :return: Boolean
36
 
    """
37
32
    import binascii
38
33
    try:
39
34
        binascii.unhexlify(hex)
56
51
        from bzrlib.plugins.git.errors import (
57
52
            GitSmartRemoteNotSupported,
58
53
            )
59
 
        from bzrlib.plugins.git.mapping import (
60
 
            default_mapping,
61
 
            )
62
54
 
63
 
        bzr_revid = getattr(branch.repository, "lookup_foreign_revision_id",
64
 
                              default_mapping.revision_id_foreign_to_bzr)(sha1)
 
55
        bzr_revid = branch.mapping.revision_id_foreign_to_bzr(sha1)
65
56
        try:
66
57
            if branch.repository.has_revision(bzr_revid):
67
58
                history = self._history(branch, bzr_revid)