/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Robert Collins
  • Date: 2007-09-28 01:20:59 UTC
  • mto: (2592.3.161 repository)
  • mto: This revision was merged to the branch mainline in revision 2880.
  • Revision ID: robertc@robertcollins.net-20070928012059-sbuwqzv68dlbb9z9
* ``CommitBuilder.record_entry_contents`` now requires the root entry of a
  tree be supplied to it, previously failing to do so would trigger a
  deprecation warning. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
            commit.
195
195
        :param tree: The tree that is being committed.
196
196
        """
197
 
        if ie.parent_id is not None:
198
 
            # if ie is not root, add a root automatically.
199
 
            symbol_versioning.warn('Root entry should be supplied to'
200
 
                ' record_entry_contents, as of bzr 0.10.',
201
 
                 DeprecationWarning, stacklevel=2)
202
 
            self.record_entry_contents(tree.inventory.root.copy(), parent_invs,
203
 
                                       '', tree)
204
 
        else:
205
 
            # In this revision format, root entries have no knit or weave When
206
 
            # serializing out to disk and back in root.revision is always
207
 
            # _new_revision_id
208
 
            ie.revision = self._new_revision_id
 
197
        # In this revision format, root entries have no knit or weave When
 
198
        # serializing out to disk and back in root.revision is always
 
199
        # _new_revision_id
 
200
        ie.revision = self._new_revision_id
209
201
 
210
202
    def record_entry_contents(self, ie, parent_invs, path, tree):
211
203
        """Record the content of ie from tree into the commit if needed.
223
215
            will not return True.)
224
216
        """
225
217
        if self.new_inventory.root is None:
 
218
            if ie.parent_id is not None:
 
219
                raise errors.RootMissing()
226
220
            self._check_root(ie, parent_invs, tree)
227
221
        self.new_inventory.add(ie)
228
222
 
332
326
            commit.
333
327
        :param tree: The tree that is being committed.
334
328
        """
335
 
        # ie must be root for this builder
336
 
        assert ie.parent_id is None
337
329
 
338
330
 
339
331
######################################################################