~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-30 11:14:06 UTC
  • mfrom: (6002 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110630111406-eimf301w6x92xkk7
mergeĀ inĀ trunk

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