[BUG] Bzr can't pull bundles from http urls

Aaron Bentley aaron.bentley at utoronto.ca
Thu Dec 7 15:33:07 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The http transport requires that relpaths be strings, not unicode.  This
is unlike get_transport, which happily accepts unicode strings.  As a
result,

get_transport(u'http://foo/bar').get('') works, but using urlutils to
split the url, then doing get_transport(u'http://foo').get(u'bar') does not.

The obvious solution would be to use the normalize_path function, but
that will also return unicode, even though such unicode consists of
ascii-range characters.

I believe this is a bug in normalize_path.

Furthermore, normalize_path does not accept urls containing tilde.  This
is a bug IMHO, because tilde is acceptable per RFC 2396.  And it would
be ludicrous to be promoting the use of tilde-containing URLs while
simultaneously claiming that tildes are illegal in URLs.

So this patch changes normalize_path to emit only bytestrings, and to
accept tilde as a safe character.  It also changes read_bundle_from_url
to normalize the url it's passed, so that it's more consistent with
Branch.open_containing.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFeDQz0F+nu1YWqI0RAj6UAJ4/akirg2Dp+fIibcKKWmKBMMcCyQCdEPSg
UAexiDkxNEjTTMi0S2ERAIc=
=OFrY
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-bundle.patch
Type: text/x-patch
Size: 2256 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061207/8a970ae0/attachment.bin 


More information about the bazaar mailing list