/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-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

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