~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-29 21:35:05 UTC
  • mfrom: (4576 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4577.
  • Revision ID: john@arbash-meinel.com-20090729213505-tkqsvy1zfpocu75w
Merge bzr.dev 4576 in prep for NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    Element,
29
29
    SubElement,
30
30
    XMLSerializer,
 
31
    escape_invalid_chars,
31
32
    )
32
33
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
33
34
from bzrlib.revision import Revision
167
168
        :raises: AssertionError if an error has occurred.
168
169
        """
169
170
        if inv.revision_id is None:
170
 
            raise AssertionError()
 
171
            raise AssertionError("inv.revision_id is None")
171
172
        if inv.root.revision is None:
172
 
            raise AssertionError()
 
173
            raise AssertionError("inv.root.revision is None")
173
174
 
174
175
    def _check_cache_size(self, inv_size, entry_cache):
175
176
        """Check that the entry_cache is large enough.
345
346
            root.set('timezone', str(rev.timezone))
346
347
        root.text = '\n'
347
348
        msg = SubElement(root, 'message')
348
 
        msg.text = rev.message
 
349
        msg.text = escape_invalid_chars(rev.message)[0]
349
350
        msg.tail = '\n'
350
351
        if rev.parent_ids:
351
352
            pelts = SubElement(root, 'parents')