[MERGE] UTF-8 encoding in binary diffs

Goffredo Baroncelli kreijack at tiscalinet.it
Sun Aug 19 11:38:06 BST 2007


Hi Jonathan

it seem that you have missed a case

$ bzr init
$ echo 1> aaaèè
$ bzr add aaaèè
added "aaaèè"
$ bzr ci -m "First checkin"
added aaaèè
Committed revision 1.
$ bzr mv aaaèè aaaùù
aaaèè => aaaùù
$ bzr diff
=== renamed file 'aaaèè' => 'aaa\xc3\xb9\xc3\xb9'


In fact in your patch 

> @@ -455,7 +455,7 @@
>           text_modified, meta_modified) in delta.renamed:
>          has_changes = 1
>          prop_str = get_prop_change(meta_modified)
> -        print >>to_file, '=== renamed %s %r => %r%s' % (
> +        print >>to_file, "=== renamed %s '%s' => %r%s" % (
>                      kind, old_path.encode('utf8'),
>                      new_path.encode('utf8'), prop_str)


the second "%r" should be "'%s'"..

Enclosed the patch and a test case.

BR
Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) 
<kreijack_AT_inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-diff-bug.diff
Type: text/x-diff
Size: 4828 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070819/967dcd03/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070819/967dcd03/attachment.pgp 


More information about the bazaar mailing list