~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/memorytree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-16 01:09:56 UTC
  • mfrom: (5784.1.4 760435-less-fail)
  • Revision ID: pqm@pqm.ubuntu.com-20110416010956-5wrpm136qq2hz5f3
(mbp) rename and deprecate failUnlessExists and failIfExists (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    revision as _mod_revision,
29
29
    )
30
30
from bzrlib.decorators import needs_read_lock
31
 
from bzrlib.inventory import Inventory
32
31
from bzrlib.osutils import sha_file
33
32
from bzrlib.mutabletree import needs_tree_write_lock
34
33
from bzrlib.transport.memory import MemoryTransport
220
219
            self._parent_ids = []
221
220
        else:
222
221
            self._parent_ids = [self._branch_revision_id]
223
 
        self._inventory = Inventory(None, self._basis_tree.get_revision_id())
 
222
        self._inventory = self._basis_tree._inventory._get_mutable_inventory()
224
223
        self._file_transport = MemoryTransport()
225
224
        # TODO copy the revision trees content, or do it lazy, or something.
226
 
        inventory_entries = self._basis_tree.iter_entries_by_dir()
 
225
        inventory_entries = self._inventory.iter_entries()
227
226
        for path, entry in inventory_entries:
228
 
            self._inventory.add(entry.copy())
229
227
            if path == '':
230
228
                continue
231
229
            if entry.kind == 'directory':