~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: 2009-03-25 04:20:12 UTC
  • mfrom: (3468.3.4 controlfiles)
  • Revision ID: pqm@pqm.ubuntu.com-20090325042012-23a6pm0mraw7g2kg
(mbp) better CountedLock handling of tokens,
        and bzrdir takes more responsibility for default file modes

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
"""
21
21
 
22
22
 
 
23
from copy import deepcopy
23
24
import os
24
25
 
25
26
from bzrlib import (
26
27
    errors,
27
28
    mutabletree,
 
29
    osutils,
28
30
    revision as _mod_revision,
29
31
    )
30
 
from bzrlib.decorators import needs_read_lock
 
32
from bzrlib.decorators import needs_read_lock, needs_write_lock
31
33
from bzrlib.osutils import sha_file
32
34
from bzrlib.mutabletree import needs_tree_write_lock
33
35
from bzrlib.transport.memory import MemoryTransport
215
217
            self._parent_ids = []
216
218
        else:
217
219
            self._parent_ids = [self._branch_revision_id]
218
 
        self._inventory = self._basis_tree._inventory._get_mutable_inventory()
 
220
        self._inventory = deepcopy(self._basis_tree._inventory)
219
221
        self._file_transport = MemoryTransport()
220
222
        # TODO copy the revision trees content, or do it lazy, or something.
221
223
        inventory_entries = self._inventory.iter_entries()