~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Aaron Bentley
  • Date: 2009-07-14 21:07:36 UTC
  • mto: This revision was merged to the branch mainline in revision 4538.
  • Revision ID: aaron@aaronbentley.com-20090714210736-1m81n4nls5fe4pxy
Updates from review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
876
876
        revno, last_rev_id = branch.last_revision_info()
877
877
        if last_rev_id == _mod_revision.NULL_REVISION:
878
878
            if merge_parents is not None:
879
 
                raise errors.MergeParentsInFirstCommit()
 
879
                raise ValueError('Cannot supply merge parents for first'
 
880
                                 ' commit.')
880
881
            parent_ids = []
881
882
        else:
882
883
            parent_ids = [last_rev_id]
883
884
            if merge_parents is not None:
884
885
                parent_ids.extend(merge_parents)
885
886
        if self._tree.get_revision_id() != last_rev_id:
886
 
            raise errors.WrongCommitBasis(self._tree)
 
887
            raise ValueError('TreeTransform not based on branch basis: %s' %
 
888
                             self._tree.get_revision_id())
887
889
        builder = branch.get_commit_builder(parent_ids)
888
890
        preview = self.get_preview_tree()
889
891
        list(builder.record_iter_changes(preview, last_rev_id,