~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: abentley
  • Date: 2006-04-20 23:47:53 UTC
  • mfrom: (1681 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1683.
  • Revision ID: abentley@lappy-20060420234753-6a6874b76f09f86d
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        e.text = '\n'
36
36
        if inv.root.file_id not in (None, ROOT_ID):
37
37
            e.set('file_id', inv.root.file_id)
 
38
        if inv.revision_id is not None:
 
39
            e.set('revision_id', inv.revision_id)
38
40
        for path, ie in inv.iter_entries():
39
41
            e.append(self._pack_entry(ie))
40
42
        return e
121
123
            if format != '5':
122
124
                raise BzrError("invalid format version %r on inventory"
123
125
                                % format)
124
 
        inv = Inventory(root_id)
 
126
        revision_id = elt.get('revision_id')
 
127
        inv = Inventory(root_id, revision_id=revision_id)
125
128
        for e in elt:
126
129
            ie = self._unpack_entry(e)
127
130
            if ie.parent_id == ROOT_ID: