~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/newinventory.py

  • Committer: Martin Pool
  • Date: 2005-06-27 06:25:30 UTC
  • Revision ID: mbp@sourcefrog.net-20050627062530-0002d5c96b0ed3c1
- note bzr log changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
            if ie.text_size != None:
39
39
                el.set('text_size', ('%d' % ie.text_size))
40
40
        elif kind != 'directory':
41
 
            bailout('unknown InventoryEntry kind %r' % kind)
 
41
            raise BzrError('unknown InventoryEntry kind %r' % kind)
42
42
 
43
43
        el.tail = '\n'
44
44
        parent_el.append(el)
97
97
 
98
98
            f.write('</directory>\n')
99
99
        else:
100
 
            bailout('unknown InventoryEntry kind %r' % kind)
 
100
            raise BzrError('unknown InventoryEntry kind %r' % kind)
101
101
 
102
102
    f.write('<inventory>\n')
103
103
    f.write('<root_directory id="%s">\n' % escape_attr(inv.root.file_id))
132
132
            ie.text_size = v and int(v)
133
133
            ie.text_sha1 = el.get('text_sha1')
134
134
        else:
135
 
            bailout("unknown inventory entry %r" % kind)
 
135
            raise BzrError("unknown inventory entry %r" % kind)
136
136
 
137
137
    inv_el = ElementTree().parse(f)
138
138
    assert inv_el.tag == 'inventory'