~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

  • Committer: Alexander Belchenko
  • Date: 2007-08-10 09:04:38 UTC
  • mto: This revision was merged to the branch mainline in revision 2694.
  • Revision ID: bialix@ukr.net-20070810090438-0835xdz0rl8825qv
fixes after Ian's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
    # check for UNC path \\HOST\path
275
275
    if win32_path.startswith('//'):
276
276
        return 'file:' + escape(win32_path)
277
 
    return ('file:///' + str(win32_path[0].upper()) + ':' +
278
 
        escape(win32_path[2:]))
 
277
    return 'file:///' + win32_path[0].upper() + ':' + escape(win32_path[2:])
279
278
 
280
279
 
281
280
local_path_to_url = _posix_local_path_to_url
371
370
    other_scheme = other[:other_first_slash]
372
371
    if base_scheme != other_scheme:
373
372
        return other
374
 
    elif sys.platform == 'win32' and base_scheme == 'file://':
375
 
        base_drive = base[base_first_slash+1:base_first_slash+3]
376
 
        other_drive = other[other_first_slash+1:other_first_slash+3]
377
 
        if base_drive != other_drive:
378
 
            return other
379
373
 
380
374
    base_path = base[base_first_slash+1:]
381
375
    other_path = other[other_first_slash+1:]