/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: Jan Balster
  • Date: 2006-08-15 12:39:42 UTC
  • mfrom: (1923 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1928.
  • Revision ID: jan@merlinux.de-20060815123942-22c388c6e9a8ac91
merge bzr.dev 1923

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Bazaar-NG -- distributed version control
 
1
# Bazaar -- distributed version control
2
2
#
3
3
# Copyright (C) 2006 by Canonical Ltd
4
4
#
181
181
        or win32_url[2] != '/'):
182
182
        raise errors.InvalidURL(url, 'Win32 file urls start with'
183
183
                ' file:///x:/, where x is a valid drive letter')
184
 
    # Preferentially using .lower() because os.getcwd() returns
185
 
    # paths with lowercase drive letters, and that helps
186
 
    # bzrlib.osutils.relpath() work correctly
187
 
    return win32_url[0].lower() + u':' + unescape(win32_url[2:])
 
184
    return win32_url[0].upper() + u':' + unescape(win32_url[2:])
188
185
 
189
186
 
190
187
def _win32_local_path_to_url(path):
200
197
    #       semantics, since 'nt' is not an available module.
201
198
    win32_path = bzrlib.osutils._nt_normpath(
202
199
        bzrlib.osutils._win32_abspath(path)).replace('\\', '/')
203
 
    return 'file:///' + win32_path[0].lower() + ':' + escape(win32_path[2:])
 
200
    return 'file:///' + win32_path[0].upper() + ':' + escape(win32_path[2:])
204
201
 
205
202
 
206
203
local_path_to_url = _posix_local_path_to_url