Merge lp:~gz/bzr/undecodable_argv_745712 into lp:bzr
Status: | Merged |
---|---|
Approved by: | Martin Pool |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5797 |
Proposed branch: | lp:~gz/bzr/undecodable_argv_745712 |
Merge into: | lp:bzr |
Diff against target: |
145 lines (+27/-28) 6 files modified
bzrlib/commands.py (+4/-3) bzrlib/osutils.py (+2/-2) bzrlib/tests/blackbox/test_command_encoding.py (+2/-3) bzrlib/tests/blackbox/test_commit.py (+0/-20) bzrlib/tests/blackbox/test_exceptions.py (+16/-0) doc/en/release-notes/bzr-2.4.txt (+3/-0) |
To merge this branch: | bzr merge lp:~gz/bzr/undecodable_argv_745712 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Approve | ||
Review via email: mp+57799@code.launchpad.net |
Commit message
better message when argv can't be decoded in the application locale
Description of the change
When sys.argv can't be decoded according to the application locale encoding, Bazaar needs to report a nice clear error. The code nearly does that already, apart from the fact the BzrError raised from osutils.
To fix this the argv decoding is now done inside commands.run_bzr rather than commands.main as it was previously. This is something of a subtle behaviour change, but the other alternative is changing the signatures of all the run_* methods, which strikes me as worse.
Should the error message also give more advice about how to fix locale issues, like the locale.setlocale except clause in the main bzr script?
Hm... just seen bb.test_
strictly that should be testnotapplicable.