~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Robey Pointer
  • Date: 2006-07-01 19:03:33 UTC
  • mfrom: (1829 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1830.
  • Revision ID: robey@lag.net-20060701190333-f58465aec4bd3412
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
 
2
#
1
3
# This program is free software; you can redistribute it and/or modify
2
4
# it under the terms of the GNU General Public License as published by
3
5
# the Free Software Foundation; either version 2 of the License, or
13
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
14
16
 
15
17
 
16
 
from bzrlib.xml_serializer import ElementTree, SubElement, Element, Serializer
 
18
from bzrlib.xml_serializer import SubElement, Element, Serializer
17
19
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
18
20
import bzrlib.inventory as inventory
19
 
from bzrlib.revision import Revision        
 
21
from bzrlib.revision import Revision
20
22
from bzrlib.errors import BzrError
21
23
 
22
24
 
197
199
            return
198
200
        for prop_elt in props_elt:
199
201
            assert prop_elt.tag == 'property', \
200
 
                "bad tag under properties list: %r" % p.tag
 
202
                "bad tag under properties list: %r" % prop_elt.tag
201
203
            name = prop_elt.get('name')
202
204
            value = prop_elt.text
203
205
            assert name not in rev.properties, \
204
 
                "repeated property %r" % p.name
 
206
                "repeated property %r" % name
205
207
            rev.properties[name] = value
206
208
 
207
209