/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-03 23:18:11 UTC
  • mfrom: (4252 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4253.
  • Revision ID: jelmer@samba.org-20090403231811-8yh9yi6xl2lfce1v
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    revision,
63
63
    trace,
64
64
    tree,
 
65
    xml_serializer,
65
66
    )
66
67
from bzrlib.branch import Branch
67
68
import bzrlib.config
607
608
        # serialiser not by commit. Then we can also add an unescaper
608
609
        # in the deserializer and start roundtripping revision messages
609
610
        # precisely. See repository_implementations/test_repository.py
610
 
 
611
 
        # Python strings can include characters that can't be
612
 
        # represented in well-formed XML; escape characters that
613
 
        # aren't listed in the XML specification
614
 
        # (http://www.w3.org/TR/REC-xml/#NT-Char).
615
 
        self.message, escape_count = re.subn(
616
 
            u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]+',
617
 
            lambda match: match.group(0).encode('unicode_escape'),
 
611
        self.message, escape_count = xml_serializer.escape_invalid_chars(
618
612
            self.message)
619
613
        if escape_count:
620
614
            self.reporter.escaped(escape_count, self.message)