~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-13 18:38:58 UTC
  • mfrom: (1863 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060713183858-ebf4aa1f9ef8bb6e
[merge] bzr.dev 1863

Show diffs side-by-side

added added

removed removed

Lines of Context:
497
497
        None; inventory entries that are carried over untouched have their
498
498
        revision set to their prior value.
499
499
        """
 
500
        # ESEPARATIONOFCONCERNS: this function is diffing and using the diff
 
501
        # results to create a new inventory at the same time, which results
 
502
        # in bugs like #46635.  Any reason not to use/enhance compare_trees?
 
503
        # ADHB 11-07-2006
500
504
        mutter("Selecting files for commit with filter %s", self.specific_files)
501
505
        # iter_entries does not visit the ROOT_ID node so we need to call
502
506
        # self._emit_progress_update once by hand.
534
538
            else:
535
539
                self.reporter.snapshot_change(change, path)
536
540
 
 
541
        if not self.specific_files:
 
542
            return
 
543
 
 
544
        # ignore removals that don't match filespec
 
545
        for path, new_ie in self.basis_inv.iter_entries():
 
546
            if new_ie.file_id in self.work_inv:
 
547
                continue
 
548
            if is_inside_any(self.specific_files, path):
 
549
                continue
 
550
            ie = new_ie.copy()
 
551
            ie.revision = None
 
552
            self.builder.record_entry_contents(ie, self.parent_invs, path,
 
553
                                               self.basis_tree)
 
554
 
537
555
    def _emit_progress_update(self):
538
556
        """Emit an update to the progress bar."""
539
557
        self.pb.update("Committing", self.pb_count, self.pb_total)