~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Andrew Bennetts
  • Date: 2010-05-14 09:02:35 UTC
  • mfrom: (5230 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5232.
  • Revision ID: andrew.bennetts@canonical.com-20100514090235-32z3rbfplw712csz
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
 
289
289
        :param tree: The tree which is being committed.
290
290
        """
291
 
        # NB: if there are no parents then this method is not called, so no
292
 
        # need to guard on parents having length.
 
291
        if len(self.parents) == 0:
 
292
            raise errors.RootMissing()
293
293
        entry = entry_factory['directory'](tree.path2id(''), '',
294
294
            None)
295
295
        entry.revision = self._new_revision_id
1045
1045
                " id and insertion revid (%r, %r)"
1046
1046
                % (inv.revision_id, revision_id))
1047
1047
        if inv.root is None:
1048
 
            raise AssertionError()
 
1048
            raise errors.RootMissing()
1049
1049
        return self._add_inventory_checked(revision_id, inv, parents)
1050
1050
 
1051
1051
    def _add_inventory_checked(self, revision_id, inv, parents):