~jameinel/bzr/2.4-incremental-push-stacked-745664

« back to all changes in this revision

Viewing changes to bzrlib/memorytree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-20 01:22:13 UTC
  • mfrom: (5802.1.2 mutable-inv-from-tree)
  • Revision ID: pqm@pqm.ubuntu.com-20110420012213-nagud1jxln5o6j36
(jelmer) Split Inventory._get_mutable_inventory() out into
 mutable_inventory_from_tree. (Jelmer Vernooij)

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
31
32
from bzrlib.osutils import sha_file
32
33
from bzrlib.mutabletree import needs_tree_write_lock
33
34
from bzrlib.transport.memory import MemoryTransport
219
220
            self._parent_ids = []
220
221
        else:
221
222
            self._parent_ids = [self._branch_revision_id]
222
 
        self._inventory = self._basis_tree._inventory._get_mutable_inventory()
 
223
        self._inventory = Inventory(None, self._basis_tree.get_revision_id())
223
224
        self._file_transport = MemoryTransport()
224
225
        # TODO copy the revision trees content, or do it lazy, or something.
225
 
        inventory_entries = self._inventory.iter_entries()
 
226
        inventory_entries = self._basis_tree.iter_entries_by_dir()
226
227
        for path, entry in inventory_entries:
 
228
            self._inventory.add(entry.copy())
227
229
            if path == '':
228
230
                continue
229
231
            if entry.kind == 'directory':