Mercurial > hgsubversion
comparison tests/test_util.py @ 511:0e2564d4257d
paths: autoescape paths from the user
This means that users should no longer URI-encode their paths. This is
a change from the past, and may require some small changes to .hg/hgrc.
This fixes certain odd issues resulting from inconsistent handling
of URI-encoding throughout hgsubversion.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 24 Dec 2009 13:30:08 -0600 |
parents | 1fd3cfa47c5e |
children | c421e6bf0d95 |
comparison
equal
deleted
inserted
replaced
510:925ff8c5989c | 511:0e2564d4257d |
---|---|
87 manifest) | 87 manifest) |
88 | 88 |
89 def fileurl(path): | 89 def fileurl(path): |
90 path = os.path.abspath(path) | 90 path = os.path.abspath(path) |
91 drive, path = os.path.splitdrive(path) | 91 drive, path = os.path.splitdrive(path) |
92 path = urllib.pathname2url(path) | |
93 if drive: | 92 if drive: |
94 drive = '/' + drive | 93 drive = '/' + drive |
95 url = 'file://%s%s' % (drive, path) | 94 url = 'file://%s%s' % (drive, path) |
96 return url | 95 return url |
97 | 96 |