/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Aaron Bentley
  • Date: 2006-04-07 22:46:52 UTC
  • mfrom: (1645 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1727.
  • Revision ID: aaron.bentley@utoronto.ca-20060407224652-4925bc3735b926f8
Merged latest bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
14
14
 
15
15
 
16
 
from bzrlib.xml import ElementTree, SubElement, Element, Serializer
 
16
from bzrlib.xml_serializer import ElementTree, SubElement, Element, Serializer
17
17
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
18
18
import bzrlib.inventory as inventory
19
19
from bzrlib.revision import Revision        
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: