~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml6.py

  • Committer: Aaron Bentley
  • Date: 2006-08-24 03:35:48 UTC
  • mto: (1910.2.43 format-bumps)
  • mto: This revision was merged to the branch mainline in revision 1997.
  • Revision ID: aaron.bentley@utoronto.ca-20060824033548-104450f485b42c75
Fix bugs in basis inventory handling, change filename

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
    def _unpack_inventory(self, elt):
20
20
        """Construct from XML Element"""
21
 
        assert elt.tag == 'inventory'
 
21
        if elt.tag != 'inventory':
 
22
            raise errors.UnexpectedInventoryFormat('Root tag is %r' % elt.tag)
22
23
        format = elt.get('format')
23
 
        if format is not None:
24
 
            if format != '6':
25
 
                raise errors.BzrError("invalid format version %r on inventory"
26
 
                                      % format)
 
24
        if format != '6':
 
25
            raise errors.UnexpectedInventoryFormat('Invalid format version %r'
 
26
                                                   % format)
27
27
        revision_id = elt.get('revision_id')
28
28
        if revision_id is not None:
29
29
            revision_id = cache_utf8.get_cached_unicode(revision_id)