~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-28 19:12:10 UTC
  • mfrom: (5967.7.4 rm-magic-methods)
  • Revision ID: pqm@pqm.ubuntu.com-20110628191210-bwblsxn26kyu3swl
(mbp) remove __contains__ methods from inventory and dict (Martin Pool)

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