Rev 5674: (jelmer) Remove unused serializer class, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Feb 21 20:59:21 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5674 [merge]
revision-id: pqm at pqm.ubuntu.com-20110221205918-g6r1qo36btstg4r7
parent: pqm at pqm.ubuntu.com-20110221143337-6xh8ycrz33mz1ttx
parent: jelmer at samba.org-20110219223903-li6ddcm9d3jic2ug
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-02-21 20:59:18 +0000
message:
(jelmer) Remove unused serializer class,
rearrange inheritance ordering of xml serializers to be more efficient.
(Jelmer Vernooij)
modified:
bzrlib/chk_serializer.py chk_serializer.py-20081002064345-2tofdfj2eqq01h4b-1
bzrlib/tests/test_import_tariff.py test_import_tariff.p-20100207155145-ff9infp7goncs7zh-1
=== modified file 'bzrlib/chk_serializer.py'
--- a/bzrlib/chk_serializer.py 2010-02-17 17:11:16 +0000
+++ b/bzrlib/chk_serializer.py 2011-02-19 22:39:03 +0000
@@ -19,10 +19,8 @@
from bzrlib import (
bencode,
cache_utf8,
- inventory,
revision as _mod_revision,
- xml6,
- xml7,
+ xml8,
)
@@ -131,36 +129,7 @@
return self.read_revision_from_string(f.read())
-class CHKSerializerSubtree(BEncodeRevisionSerializer1, xml7.Serializer_v7):
- """A CHKInventory based serializer that supports tree references"""
-
- supported_kinds = set(['file', 'directory', 'symlink', 'tree-reference'])
- format_num = '9'
- revision_format_num = None
- support_altered_by_hack = False
-
- def _unpack_entry(self, elt, entry_cache=None, return_from_cache=False):
- kind = elt.tag
- if not kind in self.supported_kinds:
- raise AssertionError('unsupported entry kind %s' % kind)
- if kind == 'tree-reference':
- file_id = elt.attrib['file_id']
- name = elt.attrib['name']
- parent_id = elt.attrib['parent_id']
- revision = elt.get('revision')
- reference_revision = elt.get('reference_revision')
- return inventory.TreeReference(file_id, name, parent_id, revision,
- reference_revision)
- else:
- return xml7.Serializer_v7._unpack_entry(self, elt,
- entry_cache=entry_cache, return_from_cache=return_from_cache)
-
- def __init__(self, node_size, search_key_name):
- self.maximum_size = node_size
- self.search_key_name = search_key_name
-
-
-class CHKSerializer(xml6.Serializer_v6):
+class CHKSerializer(xml8.Serializer_v8):
"""A CHKInventory based serializer with 'plain' behaviour."""
format_num = '9'
=== modified file 'bzrlib/tests/test_import_tariff.py'
--- a/bzrlib/tests/test_import_tariff.py 2011-01-10 22:20:12 +0000
+++ b/bzrlib/tests/test_import_tariff.py 2011-02-19 22:39:03 +0000
@@ -96,15 +96,26 @@
# 'st' in a working tree shouldn't need many modules
self.make_branch_and_tree('.')
self.run_command_check_imports(['st'], [
+ 'bzrlib.bugtracker',
'bzrlib.bundle.commands',
'bzrlib.cmd_version_info',
+ 'bzrlib.externalcommand',
'bzrlib.foreign',
+ 'bzrlib.gpg',
+ 'bzrlib.info',
'bzrlib.merge3',
+ 'bzrlib.merge_directive',
+ 'bzrlib.msgeditor',
'bzrlib.patiencediff',
'bzrlib.remote',
'bzrlib.sign_my_commits',
'bzrlib.smart',
'bzrlib.transform',
+ 'bzrlib.version_info_formats.format_rio',
+ 'bzrlib.xml4',
+ 'bzrlib.xml5',
+ 'bzrlib.xml6',
+ 'bzrlib.xml7',
'kerberos',
'smtplib',
'tarfile',
More information about the bazaar-commits
mailing list