~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: v.ladeuil+lp at free
  • Date: 2007-05-18 18:20:31 UTC
  • mto: (2485.8.44 bzr.connection.sharing)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070518182031-gbg2cgidv5l20x9p
Takes Robert comments into account.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): Write a better explanation.

* bzrlib/tests/test_init.py:
(InstrumentedTransport): Just make hooks a class attribute.
(InstrumentedTransport._get_FTP): Run hook directly in the for
loop.
(TransportHooks.run_hook, TransportHooks.uninstall_hook): Not
needed. The hooks should be cleaned up by the test itself.
(TestInit.setUp.cleanup): Resset to default hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    cache_utf8,
22
22
    errors,
23
23
    inventory,
24
 
    revision as _mod_revision,
25
24
    )
26
25
from bzrlib.xml_serializer import SubElement, Element, Serializer
27
26
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
151
150
    # of the versionedfile, without doing XML parsing.
152
151
 
153
152
    supported_kinds = set(['file', 'directory', 'symlink'])
154
 
    format_num = '5'
155
153
 
156
154
    def write_inventory_to_string(self, inv):
157
155
        """Just call write_inventory with a StringIO and return the value"""
258
256
            pelts.tail = pelts.text = '\n'
259
257
            for parent_id in rev.parent_ids:
260
258
                assert isinstance(parent_id, basestring)
261
 
                _mod_revision.check_not_reserved_id(parent_id)
262
259
                p = SubElement(pelts, 'revision_ref')
263
260
                p.tail = '\n'
264
261
                if isinstance(parent_id, str):