~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2007-10-23 22:14:32 UTC
  • mto: (2592.6.3 repository)
  • mto: This revision was merged to the branch mainline in revision 2967.
  • Revision ID: robertc@robertcollins.net-20071023221432-j8zndh1oiegql3cu
* Commit updates the state of the working tree via a delta rather than
  supplying entirely new basis trees. For commit of a single specified file
  this reduces the wall clock time for commit by roughly a 30%.
  (Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
 
384
384
            # Make the working tree up to date with the branch
385
385
            self._set_progress_stage("Updating the working tree")
386
 
            rev_tree = self.builder.revision_tree()
387
 
            # XXX: This will need to be changed if we support doing a
388
 
            # selective commit while a merge is still pending - then we'd
389
 
            # still have multiple parents after the commit.
390
 
            #
391
 
            # XXX: update_basis_by_delta is slower at present because it works
392
 
            # on inventories, so this is not active until there's a native
393
 
            # dirstate implementation.
394
 
            ## self.work_tree.update_basis_by_delta(self.rev_id,
395
 
            ##      self._basis_delta)
396
 
            self.work_tree.set_parent_trees([(self.rev_id, rev_tree)])
 
386
            self.work_tree.update_basis_by_delta(self.rev_id,
 
387
                 self._basis_delta)
397
388
            self.reporter.completed(new_revno, self.rev_id)
398
389
            self._process_post_hooks(old_revno, new_revno)
399
390
        finally: