Bug: Commit message containing control characters

Harald Meland harald.meland at usit.uio.no
Thu Sep 1 22:26:51 BST 2005


Hi,

I've just tried to convert a CVS repository into a bzr branch (using
tailor with the 'bzrng' target), and think I have discovered a bug; it
is easily reproducible like this:

  $ mkdir test
  $ cd test
  $ bzr init
  $ bzr commit --unchanged -m "`echo -e 'foo\001bar'`"
  $ bzr log
  bzr: ERROR: not well-formed (invalid token): line 2, column 12
    at /work/bazaar-ng/bzr.dev/bzrlib/util/elementtree/ElementTree.py line 1242, in feed()
    see ~/.bzr.log for debug information

The root of the problem is that the XML 1.0 specification doesn't seem
to allow encoding of such "control characters" as e.g. "\x01", if I
understand the the well-formedness constraint here correctly:

  http://www.w3.org/TR/REC-xml/#NT-Char

Regards,
-- 
Harald




More information about the bazaar mailing list