diff headers should contain non-ascii filenames in user_encoding, not in utf-8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Alexander Belchenko |
Bug Description
Currently bzr can produce diff as result of 5 different operations:
bzr diff
bzr commit --show-diff
bzr log -p
bzr merge --preview
bzr send
In most of these commands non-ascii filename always shown as utf-8 string. This is bad for windows users, because their locale never utf-8 (at least by default), and not always it's possible to switch console locale to utf-8 (and `chcp 65001` doesn't work on some Windows versions).
Furthermore, bzr itself does not understand cp65001 codepage because Python does not recognize it as utf-8, see http://
I think all comands except `send` should always print filenames in user_encoding, or AT LEAST show them in user_encoding in the === line (as bzr ci --show-diff currently does). Because all these commands are intended to produce output for humans.
Also, I should note that GNU diff (from http://
See attached files with output of various commands.
Will be nice to fix this before 2.0. Some guidance needed from core devs, especially about writing tests for this changes.
Related branches
- Alexander Belchenko: Disapprove
- bzr-core: Pending requested
-
Diff: 207 lines (+74/-11)6 files modifiedbzrlib/builtins.py (+7/-2)
bzrlib/diff.py (+8/-5)
bzrlib/log.py (+3/-1)
bzrlib/osutils.py (+7/-0)
bzrlib/shelf_ui.py (+5/-2)
bzrlib/tests/test_diff.py (+44/-1)
- Martin Pool: Needs Fixing
- Martin Packman (community): Approve
- Robert Collins (community): Needs Information
- John A Meinel: Approve
-
Diff: 222 lines (+78/-11)7 files modifiedNEWS (+6/-0)
bzrlib/builtins.py (+8/-2)
bzrlib/diff.py (+8/-5)
bzrlib/log.py (+3/-1)
bzrlib/osutils.py (+4/-0)
bzrlib/shelf_ui.py (+5/-2)
bzrlib/tests/test_diff.py (+44/-1)
description: | updated |
description: | updated |
Changed in bzr: | |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
assignee: | nobody → Alexander Belchenko (bialix) |
tags: | added: diff unicode |
tags: | added: win32 |
Changed in bzr: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.2b4 |
D:\Develop>bzr init test
Created a standalone tree (format: pack-0.92)
D:\Develop>cd test
D:\Develop\test>
D:\Develop\ test>echo one>Файл.txt
D:\Develop\test>bzr status
unknown:
Файл.txt
D:\Develop\test>bzr add
adding "Файл.txt"
D:\Develop\test>
D:\Develop\test>bzr diff
=== added file 'Файл.txt'
--- Файл.txt 1970-01-01 00:00:00 +0000
+++ Файл.txt 2009-06-02 11:36:44 +0000
@@ -0,0 +1,1 @@
+one
D:\Develop\test>
D:\Develop\test>bzr diff
=== added file '╨д╨░╨╣╨╗.txt'
--- ╨д╨░╨╣╨╗.txt 1970-01-01 00:00:00 +0000
+++ ╨д╨░╨╣╨╗.txt 2009-06-02 11:36:44 +0000
@@ -0,0 +1,1 @@
+one