[MERGE] urlutils.rebase_url handles '..' path segments in 'url'
Aaron Bentley
aaron at aaronbentley.com
Tue Jul 22 13:58:16 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Hudson wrote:
>>>> from bzrlib.urlutils import rebase_url
>>>> rebase_url('../bar', 'foo/quux', '')
> 'foo/bar'
>
> I'm not sure that 'join' is necessarily the right thing to use though --
os.path.join can't be used, because it uses os.sep. On *nix, this
provides the results we want. But on win32, it will generate URLs
containing backslashes.
bb:resubmit
> osutils.normpath(osutils.pathjoin()) would probably work just as well.
normpath also uses backslashes on win32.
> Something should change though I think :)
No argument here.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIhdlo0F+nu1YWqI0RAoaXAJ9xdWF7H/N5HJhu7CxPa5RMyg/9VgCfWg1Q
wpV6po3y/uImWJxe43Daiq8=
=gmum
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list