Bazaar on IronPython
Martin (gzlist)
gzlist at googlemail.com
Tue Jun 30 13:27:00 BST 2009
On 30/06/2009, Robert Collins <robert.collins at canonical.com> wrote:
>
>> This is all resolvable, but will mean some changes to abstractions.
>> I'm particularly adverse to interfaces like
>> bzrlib.xml8._encode_and_escape as commented in the patch - the caller
>> of an api *has* to know the provenance of a string it supplies,
>> after-the-fact heuristics are at best inefficient.
>
> Thats a deep internal function. We know the provenance of xml content in
> our repositories.
You're right, I was talking rubbish there, not the right example at
all. It isn't a good api though, and is the sort of thing that can't
be implemented with IronPython's str type.
> I would say our biggest unicode vs ascii tensions are:
> - outputting diffs (because garbage in garbage out, and that messes up
> the terminal).
Yes, this does account for the majority of junk that bzr prints on my
screen, and is a slightly different problem, which harder to fix well.
However for instance, reporting an unexpected problem suffers from
having various different strings around with no record of what
encoding they are, or how they should be presented to the user.
> - handling nonsense filesystem paths (e.g a file '0x01').
And that's the nix side of the problem, lots of things can be
arbitrary bytes rather than anything that can be safely treated as
text of a particular encoding.
Martin
More information about the bazaar
mailing list