~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-07 15:22:42 UTC
  • mfrom: (1843 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1846.
  • Revision ID: john@arbash-meinel.com-20060707152242-a7b5e0afd64d9d5a
[merge] bzr.dev 1843

Show diffs side-by-side

added added

removed removed

Lines of Context:
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