Merge lp://staging/~parthm/bzr/518609-version-info-unicodedecodeerror into lp://staging/bzr
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Robert Collins | ||||
Proposed branch: | lp://staging/~parthm/bzr/518609-version-info-unicodedecodeerror | ||||
Merge into: | lp://staging/bzr | ||||
Diff against target: |
68 lines (+11/-4) 3 files modified
NEWS (+4/-0) bzrlib/rio.py (+1/-1) bzrlib/tests/test_version_info.py (+6/-3) |
||||
To merge this branch: | bzr merge lp://staging/~parthm/bzr/518609-version-info-unicodedecodeerror | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Needs Fixing | ||
Review via email: mp+22801@code.staging.launchpad.net |
Description of the change
=== Fixes Bug #518609 ===
This fixes unicode handling of 'version-info --include-history'. UnicodeDecodeError exception is not thrown. This was discussed on the mailing list[1].
Stanza.write now uses to_file.
The tests are updated for this. As cStringIO object cannot handle unicode, the impacted tests use StringIO (imported as UnicodeStringIO) to allow writing of unicode. To allow UnicodeStringIO to behave like a file (write unicode, read str), the buffer is encoded as utf-8 on read before being passed to the caller.
Manual testing was done to ensure that unicode messages are shown correctly. E.g.:
< message: (Luk?? Lalinsk?) Add a global write lock for cmd_uncommit (related to #172649)
---
> message: (Lukáš Lalinský) Add a global write lock for cmd_uncommit (related to #172649)
[1] http://
Unmerged revisions
- 5131. By Parth Malwankar
-
updated NEWS
- 5130. By Parth Malwankar
-
merged in trunk
- 5129. By Parth Malwankar
-
#518609. version-info --include histroy handes unicode.
This really is the wrong approach I think. See the list discussion.