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

  • Committer: Jelmer Vernooij
  • Date: 2021-01-10 00:25:52 UTC
  • mfrom: (7490.40.131 work)
  • mto: (7526.3.1 work)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: jelmer@jelmer.uk-20210110002552-wnvuqtqin7uhjv3v
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
 
78
78
def parse_cvs_location(location):
79
79
    parts = location.split(':')
80
 
    if parts[0] or parts[1] not in ('pserver', 'ssh'):
81
 
        raise ValueError('not a valid pserver location string')
 
80
    if parts[0] or parts[1] not in ('pserver', 'ssh', 'extssh'):
 
81
        raise ValueError('not a valid CVS location string')
82
82
    try:
83
83
        (username, hostname) = parts[2].split('@', 1)
84
84
    except IndexError:
85
85
        hostname = parts[2]
86
86
        username = None
87
87
    scheme = parts[1]
 
88
    if scheme == 'extssh':
 
89
        scheme = 'ssh'
88
90
    path = parts[3]
89
91
    return (scheme, hostname, username, path)
90
92
 
119
121
    if not isinstance(location, str):
120
122
        raise AssertionError("location not a byte or unicode string")
121
123
 
122
 
    if location.startswith(':pserver:'):
 
124
    if location.startswith(':pserver:') or location.startswith(':extssh:'):
123
125
        return cvs_to_url(location)
124
126
 
125
127
    from .directory_service import directories