~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2007-09-13 22:41:38 UTC
  • mto: (2592.3.139 repository)
  • mto: This revision was merged to the branch mainline in revision 2821.
  • Revision ID: robertc@robertcollins.net-20070913224138-bjsgijrwe0a2kj4p
* Inventory serialisation no longer double-sha's the content.
  (Robert Collins)

* XML inventory serialisation takes 20% less time while being stricter about
  the contents. (Robert Collins)

* Tree's with bad state such as files with no length or sha will no longer
  be silently accepted by the repository XML serialiser. To serialise
  inventories without such data, pass working=True to write_inventory.
  (Robert Collins)

* New method on xml serialisers, write_inventory_to_lines, which matches the
  API used by knits for adding content. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
995
995
        return wt
996
996
 
997
997
    def _serialize(self, inventory, out_file):
998
 
        xml5.serializer_v5.write_inventory(self._inventory, out_file)
 
998
        xml5.serializer_v5.write_inventory(self._inventory, out_file,
 
999
            working=True)
999
1000
 
1000
1001
    def _deserialize(selt, in_file):
1001
1002
        return xml5.serializer_v5.read_inventory(in_file)
2640
2641
        """
2641
2642
        sio = StringIO()
2642
2643
        inv = Inventory()
2643
 
        xml5.serializer_v5.write_inventory(inv, sio)
 
2644
        xml5.serializer_v5.write_inventory(inv, sio, working=True)
2644
2645
        sio.seek(0)
2645
2646
        control_files.put('inventory', sio)
2646
2647