~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2007-03-21 17:51:42 UTC
  • mto: This revision was merged to the branch mainline in revision 2373.
  • Revision ID: john@arbash-meinel.com-20070321175142-052tm470fx9s0obl
Lazily read working inventory in workingtree.py,
this exposes code paths that are not locking the tree before
processing, because they are directly accessing tree._inventory somehow
(one case is Tree.path2id())

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
            hc.write()
278
278
 
279
279
        if _inventory is None:
 
280
            # This will be acquired on lock_read() or lock_write()
280
281
            self._inventory_is_modified = False
281
 
            self.read_working_inventory()
 
282
            self._inventory = None
 
283
            self._inventory_fp = None
282
284
        else:
283
285
            # the caller of __init__ has provided an inventory,
284
286
            # we assume they know what they are doing - as its only