Mercurial > public > mercurial-scm > hg-stable
diff tests/test-url.py @ 14313:a389dd285282
util: make str(url) return file:/// for abs paths again
str(url) was recently changed to return only file:/. However, the
canonical way to represent absolute local paths is file:/// [1], which
is also expected by at least hgsubversion.
Relative paths are returned as file:the/relative/path.
[1] http://en.wikipedia.org/wiki/File_URI_scheme
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Thu, 12 May 2011 16:41:56 +0200 |
parents | 5fa21960b2f4 |
children | 27b080aa880a |
line wrap: on
line diff
--- a/tests/test-url.py Thu May 12 18:35:04 2011 -0500 +++ b/tests/test-url.py Thu May 12 16:41:56 2011 +0200 @@ -191,11 +191,23 @@ >>> str(u) 'http://foo/bar' + >>> u = url('file:/foo/bar/baz') + >>> u + <url scheme: 'file', path: '/foo/bar/baz'> + >>> str(u) + 'file:///foo/bar/baz' + >>> u = url('file:///foo/bar/baz') >>> u <url scheme: 'file', path: '/foo/bar/baz'> >>> str(u) - 'file:/foo/bar/baz' + 'file:///foo/bar/baz' + + >>> u = url('file:foo/bar/baz') + >>> u + <url scheme: 'file', path: 'foo/bar/baz'> + >>> str(u) + 'file:foo/bar/baz' """ doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)