~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2006-05-12 00:47:25 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1712.
  • Revision ID: robertc@robertcollins.net-20060512004725-3b96faa29b385239
Rename Commit._update to _emit_progress_update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
                    or self.new_inv != self.basis_inv):
322
322
                raise PointlessCommit()
323
323
 
324
 
            self._update()
 
324
            self._emit_progress_update()
325
325
            self.inv_sha1 = self.branch.repository.add_inventory(
326
326
                self.rev_id,
327
327
                self.new_inv,
328
328
                self.present_parents
329
329
                )
330
 
            self._update()
 
330
            self._emit_progress_update()
331
331
            self._make_revision()
332
332
            # revision data is in the local branch now.
333
333
            
357
357
                                  {'branch':self.branch,
358
358
                                   'bzrlib':bzrlib,
359
359
                                   'rev_id':self.rev_id})
360
 
            self._update()
 
360
            self._emit_progress_update()
361
361
        finally:
362
362
            self._cleanup()
363
363
 
539
539
        # mark-merge.  
540
540
 
541
541
        # iter_entries does not visit the ROOT_ID node so we need to call
542
 
        # self._update once by hand.
543
 
        self._update()
 
542
        # self._emit_progress_update once by hand.
 
543
        self._emit_progress_update()
544
544
        for path, ie in self.new_inv.iter_entries():
545
 
            self._update()
 
545
            self._emit_progress_update()
546
546
            previous_entries = ie.find_previous_heads(
547
547
                self.parent_invs,
548
548
                self.weave_store,
568
568
        mutter("Selecting files for commit with filter %s", self.specific_files)
569
569
        self.new_inv = Inventory(revision_id=self.rev_id)
570
570
        # iter_entries does not visit the ROOT_ID node so we need to call
571
 
        # self._update once by hand.
572
 
        self._update()
 
571
        # self._emit_progress_update once by hand.
 
572
        self._emit_progress_update()
573
573
        for path, new_ie in self.work_inv.iter_entries():
574
 
            self._update()
 
574
            self._emit_progress_update()
575
575
            file_id = new_ie.file_id
576
576
            mutter('check %s {%s}', path, new_ie.file_id)
577
577
            if self.specific_files:
597
597
            mutter('%s selected for commit', path)
598
598
            self._select_entry(new_ie)
599
599
 
600
 
    def _update(self):
 
600
    def _emit_progress_update(self):
601
601
        """Emit an update to the progress bar."""
602
602
        self.pb.update("Committing", self.pb_count, self.pb_total)
603
603
        self.pb_count += 1