Merge lp:~gz/bzr/url_unquote_unreserved_842223 into lp:bzr
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jelmer Vernooij | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 6265 | ||||
Proposed branch: | lp:~gz/bzr/url_unquote_unreserved_842223 | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
85 lines (+29/-3) 4 files modified
bzrlib/tests/per_transport.py (+22/-0) bzrlib/tests/test_smart_transport.py (+1/-1) bzrlib/urlutils.py (+3/-2) doc/en/release-notes/bzr-2.5.txt (+3/-0) |
||||
To merge this branch: | bzr merge lp:~gz/bzr/url_unquote_unreserved_842223 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Approve | ||
Jelmer Vernooij (community) | Approve | ||
Review via email: mp+82309@code.launchpad.net |
Commit message
Unquote unreserved characters including tilde in urlutils.URL methods
Description of the change
Fixes regression in URL handling introduced by changes needed for addressing colocated branches. This branch doesn't clean up the design of urlutils, but adds more wallpaper to get the basic handling back to how it was, and actually makes transport.
The basic concept is that to make comparison of urls simple (and fix the problems that the 'escape test isolation' checks have with a number of sftp tests), unreserved characters should not be percent encoded. The most current url related RFC recommends this, and particularly calls out tilde:
<http://
There should probably be some urlutils.URL specific tests for this class of problems, but I the per_transport cases were the neatest way of comparing before urlutils rewrite and after.
I removed a test for the other side of this (that reserved characters should be escaped) because it broke things too badly, and whether reserved characters can be correctly interpreted as just being in need of escaping is context dependent.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/15/2011 9:14 PM, Martin Packman wrote: /bugs.launchpad .net/bzr/ +bug/842223 /code.launchpad .net/~gz/ bzr/url_ unquote_ unreserved_ 842223/ +merge/ 82309 pathfilter a little better. tools.ietf. org/html/ rfc3986# section- 2.3>
> Martin Packman has proposed merging
> lp:~gz/bzr/url_unquote_unreserved_842223 into lp:bzr.
>
> Requested reviews: bzr-core (bzr-core) Related bugs: Bug #842223 in
> Bazaar: "Change to tilde escaping causes test failures"
> https:/
>
> For more details, see:
> https:/
>
> Fixes regression in URL handling introduced by changes needed for
> addressing colocated branches. This branch doesn't clean up the
> design of urlutils, but adds more wallpaper to get the basic
> handling back to how it was, and actually makes
> transport.
>
> The basic concept is that to make comparison of urls simple (and
> fix the problems that the 'escape test isolation' checks have with
> a number of sftp tests), unreserved characters should not be
> percent encoded. The most current url related RFC recommends this,
> and particularly calls out tilde:
>
> <http://
>
> There should probably be some urlutils.URL specific tests for this
> class of problems, but I the per_transport cases were the neatest
> way of comparing before urlutils rewrite and after.
>
> I removed a test for the other side of this (that reserved
> characters should be escaped) because it broke things too badly,
> and whether reserved characters can be correctly interpreted as
> just being in need of escaping is context dependent.
I haven't really reviewed the code, I would just be really careful
changing how encoding works. It tends to break users because of the
"is the branch I'm pulling from my master branch" check.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
C7L8ACgkQJdeBCY SNAAOqgQCeMyMw7 wV7NqL56wW9KXkh Hsvb chSOvcaIM98+ 95Mu+
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk7
QcMAn1iCLXByuH9
=vk65
-----END PGP SIGNATURE-----