223
223
raise errors.NoSuchId(self, file_id)
225
def set_parent_ids(self, revision_ids, allow_leftmost_as_ghost=False):
226
"""See MutableTree.set_parent_trees()."""
227
if len(revision_ids) == 0:
228
self._parent_ids = []
229
self._basis_tree = self.branch.repository.revision_tree(None)
231
self._parent_ids = revision_ids
232
self._basis_tree = self.branch.repository.revision_tree(
234
self._branch_revision_id = revision_ids[0]
225
236
def set_parent_trees(self, parents_list, allow_leftmost_as_ghost=False):
226
237
"""See MutableTree.set_parent_trees()."""
227
238
if len(parents_list) == 0:
228
239
self._parent_ids = []
229
self._basis_tree = self.branch.repository.revisiontree(None)
240
self._basis_tree = self.branch.repository.revision_tree(None)
231
242
if parents_list[0][1] is None and not allow_leftmost_as_ghost:
232
243
# a ghost in the left most parent
233
244
raise errors.GhostRevisionUnusableHere(parents_list[0][0])
234
245
self._parent_ids = [parent_id for parent_id, tree in parents_list]
235
246
if parents_list[0][1] is None:
236
self._basis_tree = self.branch.repository.revisiontree(None)
247
self._basis_tree = self.branch.repository.revision_tree(None)
238
249
self._basis_tree = parents_list[0][1]
239
250
self._branch_revision_id = parents_list[0][0]