Merge lp:~mwhudson/launchpad/unicod-branch-names-bug-449528 into lp:launchpad
Proposed by
Michael Hudson-Doyle
on 2010-02-18
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Tim Penhey on 2010-02-18 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~mwhudson/launchpad/unicod-branch-names-bug-449528 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
396 lines (+121/-29) 8 files modified
lib/lp/code/doc/branch-xmlrpc.txt (+2/-2) lib/lp/code/model/branch.py (+1/-1) lib/lp/code/xmlrpc/branch.py (+11/-8) lib/lp/code/xmlrpc/codehosting.py (+11/-6) lib/lp/code/xmlrpc/tests/test_branch.py (+63/-6) lib/lp/code/xmlrpc/tests/test_codehosting.py (+22/-1) lib/lp/codehosting/inmemory.py (+7/-4) lib/lp/codehosting/vfs/branchfs.py (+4/-1) |
||||
| To merge this branch: | bzr merge lp:~mwhudson/launchpad/unicod-branch-names-bug-449528 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | 2010-02-18 | Approve on 2010-02-18 | |
|
Review via email:
|
|||
Commit Message
Fix some OOPSes that can result from attempts to push branches containing non-ASCII names.
To post a comment you must log in.
| Michael Hudson-Doyle (mwhudson) wrote : | # |
| Tim Penhey (thumper) wrote : | # |
Looks good to me. I trust you've tried pushing locally - I'm not going to.
review:
Approve

Hi there,
This branch fixes various explosions you can get when trying to use non-ascii characters in branch names. We don't allow this, but we should fail gracefully and this branch tries to get us there.
There are various things that conspire to making this annoying:
* xmlrpclib papers over the difference between str and unicode to the extent that if you send a utf-8 encoded str containing non-ascii characters, the other side will get a unicode string.
* in particular this applied to the 'faultString' attribute of Faults.
* Python exceptions containing non-ascii unicode strings are a bit like dodgy hand grenades, at least in Python 2.5: they tend to blow up if you touch them.
* There turned out to be bugs in bzr in this area, now fixed in the version we are using.
Anyway, this branch fixes most problems I found. I recommend running make run_all and trying to push branches named things like "bzr+ssh://<email address hidden> /~m%c2% a9rk/gnome- trminal/ dd".
This branch has been sitting around in my repo for ages. I'll be happy to get it done!
Cheers,
mwh