~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-23 04:33:27 UTC
  • mfrom: (3775.2.34 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090323043327-txb4jri5i3gssuj5
(robertc) Add CommitBuilder.record_iter_changes. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
                               " parameter is required for commit().")
260
260
 
261
261
        self.bound_branch = None
262
 
        self.any_entries_changed = False
263
262
        self.any_entries_deleted = False
264
263
        if exclude is not None:
265
264
            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_changes())):
442
441
            return
443
442
        raise PointlessCommit()
444
443
 
689
688
                # required after that changes.
690
689
                if len(self.parents) > 1:
691
690
                    ie.revision = None
692
 
                _, version_recorded, _ = self.builder.record_entry_contents(
693
 
                    ie, self.parent_invs, path, self.basis_tree, None)
694
 
                if version_recorded:
695
 
                    self.any_entries_changed = True
 
691
                self.builder.record_entry_contents(ie, self.parent_invs, path,
 
692
                    self.basis_tree, None)
696
693
 
697
694
    def _report_and_accumulate_deletes(self):
698
695
        # XXX: Could the list of deleted paths and ids be instead taken from
854
851
            ie.revision = None
855
852
        # For carried over entries we don't care about the fs hash - the repo
856
853
        # isn't generating a sha, so we're not saving computation time.
857
 
        _, version_recorded, fs_hash = self.builder.record_entry_contents(
 
854
        _, _, fs_hash = self.builder.record_entry_contents(
858
855
            ie, self.parent_invs, path, self.work_tree, content_summary)
859
 
        if version_recorded:
860
 
            self.any_entries_changed = True
861
856
        if report_changes:
862
857
            self._report_change(ie, path)
863
858
        if fs_hash: