[RFC] diff header encoding for Windows users

Alexander Belchenko bialix at ukr.net
Mon May 24 11:13:43 BST 2010


Hi,

I'm working on Bug #382699 https://bugs.launchpad.net/bzr/+bug/382699.
I've started this work at UDS with some help from Aaron (thanks!)

Currently there are 5 commands which can produce diff output:

bzr diff
bzr commit --show-diff
bzr log -p
bzr merge --preview
bzr send

My current patch already fixes problem for the first two.

For other commands I think to do the following:

For `merge --preview` I think we should do the same as for `diff`, e.g. 
use mbcs encoding on Windows.

For `log -p` I'm inclined to use terminal_encoding instead of mbcs, 
because there is other unicode output encoded in terminal_encoding.

The hardest thing is `send`. I think by default there is should be 
`utf-8` because it supposed to be bzr (machine) readable.

For `diff`, `log -p`, `merge --preview` and `send` I would like to 
introduce new command-line option `--path-encoding` to control the 
encoding of filenames in diff headers.

It seems my patch won't be accepted to 2.1, so introducing new option is 
fine for bzr.dev, IMO.


I hope I don't miss anything important here.
Comments?




More information about the bazaar mailing list