~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2006-06-07 18:12:52 UTC
  • mto: This revision was merged to the branch mainline in revision 1753.
  • Revision ID: jelmer@samba.org-20060607181252-3bd3b1113e4cbad6
Move make_revision() to commit builder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                           ConflictsInTree,
83
83
                           StrictCommitFailed
84
84
                           )
85
 
from bzrlib.revision import Revision
86
85
from bzrlib.testament import Testament
87
86
from bzrlib.trace import mutter, note, warning
88
87
from bzrlib.xml5 import serializer_v5
307
306
                raise PointlessCommit()
308
307
 
309
308
            self._emit_progress_update()
310
 
            self.inv_sha1 = self.builder.finish_inventory()
 
309
            self.builder.finish_inventory()
311
310
            self._emit_progress_update()
312
311
            self.builder.set_message(self.message)
313
 
            self._make_revision()
314
 
            self.rev_id = self.builder._new_revision_id
 
312
            self.rev_id = self.builder.commit()
315
313
            # revision data is in the local branch now.
316
314
            
317
315
            # upload revision data to the master.
473
471
                else:
474
472
                    mutter("commit will ghost revision %r", parent_id)
475
473
            
476
 
    def _make_revision(self):
477
 
        """Record a new revision object for this commit."""
478
 
        rev = Revision(timestamp=self.builder._timestamp,
479
 
                       timezone=self.builder._timezone,
480
 
                       committer=self.builder._committer,
481
 
                       message=self.builder.message,
482
 
                       inventory_sha1=self.inv_sha1,
483
 
                       revision_id=self.builder._new_revision_id,
484
 
                       properties=self.builder._revprops)
485
 
        rev.parent_ids = self.builder.parents
486
 
        self.branch.repository.add_revision(self.builder._new_revision_id, rev, 
487
 
            self.builder.new_inventory, self.builder._config)
488
 
 
489
474
    def _remove_deleted(self):
490
475
        """Remove deleted files from the working inventories.
491
476