~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

Move all features to bzrlib.tests.features in 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
        if sub_tree_id == self.get_root_id():
163
163
            raise errors.BadReferenceTarget(self, sub_tree,
164
164
                                     'Trees have the same root id.')
165
 
        if sub_tree_id in self:
 
165
        if self.has_id(sub_tree_id):
166
166
            raise errors.BadReferenceTarget(self, sub_tree,
167
167
                                            'Root id already present in tree')
168
168
        self._add([sub_tree_path], [sub_tree_id], ['tree-reference'])
554
554
        entry = self._invdelta.get(inv_path)
555
555
        if entry is not None:
556
556
            return entry[3]
 
557
        # Find a 'best fit' match if the filesystem is case-insensitive
 
558
        inv_path = self.tree._fix_case_of_inventory_path(inv_path)
557
559
        file_id = self.tree.path2id(inv_path)
558
560
        if file_id is not None:
559
561
            return self.tree.iter_entries_by_dir([file_id]).next()[1]