[darcs-devel] [issue1143] darcs changes --xml is not consistently encoded

Ben Franksen bugs at darcs.net
Fri Feb 25 11:09:08 UTC 2011


Ben Franksen <benjamin.franksen at bessy.de> added the comment:

My colleague has just been bitten by this one, working on a darcs
plugin to hudson (http://hudson-ci.org/): the Java xml parser is not
able to correctly parse the "darcs changes --xml" output, because darcs
some repositories contain *different* encodings in the metadata
(different patches having been recorded with different locales).

Of the three solutions listed by twb, only (1) and (2) should be
considered ((0) being too unfriendly to users), the decision between
them is purely a matter of implementation (no user-visible difference
AFAICS). Along with a fix to this problem, the --xml output should be
fixed to convert everything to either the user's locale, or else some
standard encoding; in any case the --xml output should be correct xml,
i.e. provide a header specifying the encoding and then make sure the
output is actually valid according to this encoding.

Furthermore, darcs should offer an easy way for users to fix/upgrade
existing repositories with mixed encodings to the new scheme. The
upgrade fix/procedure should let the user declare what the default
encoding for patch metadata in the existing repo is, but should also
prompt her (for another encoding) if conversion is impossible.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1143>
__________________________________


More information about the darcs-devel mailing list