~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: 2008-09-27 04:04:26 UTC
  • mfrom: (3744.1.2 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080927040426-dv3yctm2h2fd2bzf
(jam) Merge 1.7.1rc1 back into bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
 
23
23
from copy import deepcopy
 
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
32
from bzrlib.decorators import needs_read_lock, needs_write_lock
99
101
            return None, False, None
100
102
        return entry.kind, entry.executable, None
101
103
 
 
104
    @needs_tree_write_lock
 
105
    def rename_one(self, from_rel, to_rel):
 
106
        file_id = self.path2id(from_rel)
 
107
        to_dir, to_tail = os.path.split(to_rel)
 
108
        to_parent_id = self.path2id(to_dir)
 
109
        self._file_transport.move(from_rel, to_rel)
 
110
        self._inventory.rename(file_id, to_parent_id, to_tail)
 
111
 
102
112
    def path_content_summary(self, path):
103
113
        """See Tree.path_content_summary."""
104
114
        id = self.path2id(path)