show_diff_trees writes Unicode if there are Binary files
Bug #110092 reported by
John A Meinel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned | ||
Breezy |
Fix Released
|
Medium
|
Jelmer Vernooij |
Bug Description
Currently 'show_diff_trees' is supposed to be defined as writing 8-bit strings to the output file.
For filenames, it always writes utf-8 strings. And for file contents it writes the raw 8-bit content.
However the code path for handling Binary files, just writes the unicode filenames directly to the file.
It should instead encode to utf8 first.
Changed in bzr: | |
importance: | Undecided → Medium |
status: | Unconfirmed → Confirmed |
Changed in bzr: | |
status: | In Progress → Confirmed |
tags: | added: diff |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | New → Fix Released |
importance: | Undecided → Medium |
assignee: | nobody → Jelmer Vernooij (jelmer) |
To post a comment you must log in.
The fix may be as simple as: inventory. py'
label_ pair = (to_label, from_label)
label_ pair = (from_label, to_label) .encode( 'utf8')
=== modified file 'bzrlib/
--- bzrlib/inventory.py 2007-04-04 02:31:25 +0000
+++ bzrlib/inventory.py 2007-04-25 21:15:37 +0000
@@ -665,7 +665,7 @@
else:
- print >> output_to, "Binary files %s and %s differ" % label_pair
+ print >> output_to, ("Binary files %s and %s differ" % label_pair)
def has_text(self): has_text. """
"""See InventoryEntry.