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

  • Committer: Jelmer Vernooij
  • Date: 2020-07-28 00:32:38 UTC
  • mfrom: (7490.40.77 work)
  • mto: (7490.40.79 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200728003238-vx5u412hn72f18lr
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from dulwich.client import parse_rsync_url
27
27
 
28
28
 
29
 
KNOWN_GIT_SCHEMES = ['git+ssh', 'git', 'http', 'https', 'ftp']
 
29
KNOWN_GIT_SCHEMES = ['git+ssh', 'git', 'http', 'https', 'ftp', 'ssh']
 
30
SCHEME_REPLACEMENT = {
 
31
    'ssh': 'git+ssh',
 
32
    }
30
33
 
31
34
 
32
35
def git_url_to_bzr_url(location, branch=None, ref=None):
48
51
                port=None,
49
52
                quoted_path=urlutils.quote(path, safe="/~"))
50
53
        location = str(url)
 
54
    elif url.scheme in SCHEME_REPLACEMENT:
 
55
        url.scheme = SCHEME_REPLACEMENT[url.scheme]
 
56
        location = str(url)
51
57
    if ref == b'HEAD':
52
58
        ref = branch = None
53
59
    if ref: