~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Martin Pool
  • Date: 2011-06-14 02:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110614022141-18hmm7s0iw3utcbj
Deprecate __contains__ on Tree and Inventory

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'])