~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-04-29 19:56:21 UTC
  • mfrom: (1.1.52 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20090429195621-601ojne4y8005km2
* New upstream release.
  + Fixes default format for upgrade command. (Closes: #464688)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    revision as _mod_revision,
25
25
    trace,
26
26
    )
27
 
from bzrlib.xml_serializer import SubElement, Element, Serializer
 
27
from bzrlib.xml_serializer import (
 
28
    Element,
 
29
    SubElement,
 
30
    XMLSerializer,
 
31
    )
28
32
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
29
33
from bzrlib.revision import Revision
30
34
from bzrlib.errors import BzrError
139
143
    _to_escaped_map.clear()
140
144
 
141
145
 
142
 
class Serializer_v8(Serializer):
 
146
class Serializer_v8(XMLSerializer):
143
147
    """This serialiser adds rich roots.
144
148
 
145
149
    Its revision format number matches its inventory number.
160
164
        """Extension point for subclasses to check during serialisation.
161
165
 
162
166
        :param inv: An inventory about to be serialised, to be checked.
163
 
        :raises: AssertionError if an error has occured.
 
167
        :raises: AssertionError if an error has occurred.
164
168
        """
165
169
        if inv.revision_id is None:
166
170
            raise AssertionError()
422
426
        if entry_cache is not None and revision is not None:
423
427
            key = (file_id, revision)
424
428
            try:
425
 
                # We copy it, because some operatations may mutate it
 
429
                # We copy it, because some operations may mutate it
426
430
                cached_ie = entry_cache[key]
427
431
            except KeyError:
428
432
                pass