Comment 12 for bug 989420

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 989420] Re: qlog/qdiff: "internal error" on diff encoding change

André Bachmann пишет:
> This rises a question: If the encoding is saved per branch, why is it
> possible to change the encoding twice to latin-1 when I watch two diffs
> on the same branch (with different revisions)? A possible workaround
> might be: If the user changes the encoding on one side, the other side
> should automatically refresh the view with the new encoding. So it won't
> be necessary to change the encoding twice in a short time (if this is
> really the problem).

André, we've tried to support [a rare] use case when you have to compare
file in different encodings. For example, some old version of file used
latin-1 and later project switched to use utf-8. Of course in this case
those 2 versions will be seen as [almost completely] different by bzr,
but at least you'll get the idea what was the file content. The things
are much worse for Cyrillic (Russian text could be in 6 different
encodings including utf-8, 4 of them are still in use) or for CJK.

So, I think the viable workaround is to catch that Error and show a
humble notification about inability to save the encoding, but actually
change it in the qdiff window. Another (orthogonal) option is to provide
a knob in Diff-Options to switch between "one encoding for left and
right", "different encodings for left and right". But I think the first
workaround will actually solve most of the pain from this error. That
should be an easy fix.

--
All the dude wanted was his rug back