/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-28 02:47:10 UTC
  • mfrom: (7519.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200728024710-a2ylds219f1lsl62
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/388173

Show diffs side-by-side

added added

removed removed

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