/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: Canonical.com Patch Queue Manager
  • Date: 2008-07-17 06:17:42 UTC
  • mfrom: (3503.1.2 bzr.serve_all_roots_win32)
  • Revision ID: pqm@pqm.ubuntu.com-20080717061742-zs1bj4n2m7qnzoaf
(Adrian Wilkins) Serve all filesystem roots on Windows (bug #240910)

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
            raise errors.InvalidURL(url, 'Win32 UNC path urls'
251
251
                ' have form file://HOST/path')
252
252
        return unescape(win32_url)
 
253
 
 
254
    # allow empty paths so we can serve all roots
 
255
    if win32_url == '///':
 
256
        return '/'
 
257
    
253
258
    # usual local path with drive letter
254
259
    if (win32_url[3] not in ('abcdefghijklmnopqrstuvwxyz'
255
260
                             'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
271
276
    #       which actually strips trailing space characters.
272
277
    #       The worst part is that under linux ntpath.abspath has different
273
278
    #       semantics, since 'nt' is not an available module.
 
279
    if path == '/':
 
280
        return 'file:///'
 
281
 
274
282
    win32_path = osutils._win32_abspath(path)
275
283
    # check for UNC path \\HOST\path
276
284
    if win32_path.startswith('//'):