~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-08-18 18:17:19 UTC
  • mfrom: (1711.2.133 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060818181719-90004a4648d8537a
(cfbolz,hpk,robertc,jam) Add SFTP benchmark tests, and tests across a delayed socket

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python
2
 
 
3
1
# This program is free software; you can redistribute it and/or modify
4
2
# it under the terms of the GNU General Public License as published by
5
3
# the Free Software Foundation; either version 2 of the License, or
6
4
# (at your option) any later version.
7
 
 
 
5
#
8
6
# This program is distributed in the hope that it will be useful,
9
7
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
8
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
9
# GNU General Public License for more details.
12
 
 
 
10
#
13
11
# You should have received a copy of the GNU General Public License
14
12
# along with this program; if not, write to the Free Software
15
13
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
14
 
17
15
 
18
 
from bzrlib.xml import ElementTree, SubElement, Element, Serializer
 
16
from bzrlib.xml_serializer import ElementTree, SubElement, Element, Serializer
19
17
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
20
18
import bzrlib.inventory as inventory
21
19
from bzrlib.revision import Revision        
29
27
class _Serializer_v4(Serializer):
30
28
    """Version 0.0.4 serializer
31
29
 
32
 
    You should use the serialzer_v4 singleton."""
 
30
    You should use the serializer_v4 singleton."""
33
31
    
34
32
    __slots__ = []
35
33
    
36
34
    def _pack_inventory(self, inv):
37
35
        """Convert to XML Element"""
 
36
        # v4 serialization is not used any more.
 
37
        raise NotImplementedError(self._pack_inventory)
38
38
        e = Element('inventory')
39
39
        e.text = '\n'
40
40
        if inv.root.file_id not in (None, ROOT_ID):
116
116
        else:
117
117
            raise BzrError("unknown kind %r" % kind)
118
118
 
119
 
        ## mutter("read inventoryentry: %r" % (elt.attrib))
 
119
        ## mutter("read inventoryentry: %r", elt.attrib)
120
120
 
121
121
        return ie
122
122