Merge lp:~gz/bzr-builddeb/decode_changelog_for_commit_message_853664 into lp:bzr-builddeb
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | 616 |
Merged at revision: | 618 |
Proposed branch: | lp:~gz/bzr-builddeb/decode_changelog_for_commit_message_853664 |
Merge into: | lp:bzr-builddeb |
Diff against target: |
64 lines (+36/-1) 3 files modified
__init__.py (+2/-1) tests/blackbox/test_builddeb.py (+21/-0) tests/test_commit_message.py (+13/-0) |
To merge this branch: | bzr merge lp:~gz/bzr-builddeb/decode_changelog_for_commit_message_853664 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+77578@code.launchpad.net |
Description of the change
This branch makes builddeb set the commit message correctly again from non-ascii debian/changelog files.
With Bazaar 2.4 there's a new hook to specify the commit message fully rather than just using a template, which builddeb takes advantage of when it's available. The old template hook point expects a byte string, and decodes the result from the user encoding. The new hook point doesn't do any decoding so returning non-ascii bytes results in bzr internals complaining.
According to Debian Policy, "The entire changelog must be encoded in UTF-8." so it should be safe to just decode without need for any fancy error handling:
<http://
Note the old hook is actually subtly broken, it relies on the program being run in a locale with a UTF-8 encoding or it would break (but in an obvious and fixable way, so it's not that important).
urgh, I cry every time I see the two space indentation..
Thanks for the fix.