/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/commit.py

  • Committer: Robert Collins
  • Date: 2008-11-18 03:02:21 UTC
  • mto: This revision was merged to the branch mainline in revision 4183.
  • Revision ID: robertc@robertcollins.net-20081118030221-u9cx70qw029tg2b5
Move --unchanged detection in commit into the CommitBuilder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
                               " parameter is required for commit().")
258
258
 
259
259
        self.bound_branch = None
260
 
        self.any_entries_changed = False
261
260
        self.any_entries_deleted = False
262
261
        if exclude is not None:
263
262
            self.exclude = sorted(
438
437
        # unless deletes occured, in which case the length is irrelevant.
439
438
        if (self.any_entries_deleted or 
440
439
            (len(self.builder.new_inventory) != 1 and
441
 
             self.any_entries_changed)):
 
440
             self.builder.any_entries_changed())):
442
441
            return
443
442
        raise PointlessCommit()
444
443
 
688
687
                # required after that changes.
689
688
                if len(self.parents) > 1:
690
689
                    ie.revision = None
691
 
                _, version_recorded, _ = self.builder.record_entry_contents(
692
 
                    ie, self.parent_invs, path, self.basis_tree, None)
693
 
                if version_recorded:
694
 
                    self.any_entries_changed = True
 
690
                self.builder.record_entry_contents(ie, self.parent_invs, path,
 
691
                    self.basis_tree, None)
695
692
 
696
693
    def _report_and_accumulate_deletes(self):
697
694
        # XXX: Could the list of deleted paths and ids be instead taken from
842
839
            ie.revision = None
843
840
        # For carried over entries we don't care about the fs hash - the repo
844
841
        # isn't generating a sha, so we're not saving computation time.
845
 
        _, version_recorded, fs_hash = self.builder.record_entry_contents(
 
842
        _, _, fs_hash = self.builder.record_entry_contents(
846
843
            ie, self.parent_invs, path, self.work_tree, content_summary)
847
 
        if version_recorded:
848
 
            self.any_entries_changed = True
849
844
        if report_changes:
850
845
            self._report_change(ie, path)
851
846
        if fs_hash: