/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 bzrlib/urlutils.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-18 09:39:11 UTC
  • mfrom: (6082 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6085.
  • Revision ID: jelmer@samba.org-20110818093911-teocxqqn8yj16q2u
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
# jam 20060502 Sorted to 'l' because the final target is 'local_path_from_url'
182
182
def _posix_local_path_from_url(url):
183
183
    """Convert a url like file:///path/to/foo into /path/to/foo"""
 
184
    url = split_segment_parameters_raw(url)[0]
184
185
    file_localhost_prefix = 'file://localhost/'
185
186
    if url.startswith(file_localhost_prefix):
186
187
        path = url[len(file_localhost_prefix) - 1:]
209
210
    if not url.startswith('file://'):
210
211
        raise errors.InvalidURL(url, 'local urls must start with file:///, '
211
212
                                     'UNC path urls must start with file://')
 
213
    url = split_segment_parameters_raw(url)[0]
212
214
    # We strip off all 3 slashes
213
215
    win32_url = url[len('file:'):]
214
216
    # check for UNC path: //HOST/path