~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/serializer.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-01 21:27:08 UTC
  • mto: This revision was merged to the branch mainline in revision 4887.
  • Revision ID: john@arbash-meinel.com-20091201212708-bjlq7ydk7xtmzuhd
Add a flag that controls if we will return InventoryEntries from the cache.

Setting this to true makes conversion a lot faster, but isn't safe to do
all the time, as callers might mutate the returned object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
    squashes_xml_invalid_characters = False
28
28
 
 
29
    # Setting this true will return InventoryEntry items directly from the
 
30
    # cache, rather than copying them. It can be much faster for some
 
31
    # operations, but the callers must not mutate the returned objects
 
32
    safe_to_use_cache_items = False
 
33
 
29
34
    def write_inventory(self, inv, f):
30
35
        """Write inventory to a file.
31
36