/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: 2007-09-11 09:09:40 UTC
  • mto: (2592.3.134 repository)
  • mto: This revision was merged to the branch mainline in revision 2879.
  • Revision ID: robertc@robertcollins.net-20070911090940-2lbw0h6ev8z2zp6w
Fixup various commit test failures falling out from the other commit changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
        if specific_files:
660
660
            for path, new_ie in self.basis_inv.iter_entries():
661
661
                if new_ie.file_id in self.builder.new_inventory:
 
662
                    # already added - skip.
662
663
                    continue
663
664
                if is_inside_any(specific_files, path):
 
665
                    # was inside the selected path, if not present it has been
 
666
                    # deleted so skip.
664
667
                    continue
 
668
                # not in final inv yet, was not in the selected files, so is an
 
669
                # entry to be preserved unaltered.
665
670
                ie = new_ie.copy()
666
 
                ie.revision = None
667
671
                self.builder.record_entry_contents(ie, self.parent_invs, path,
668
 
                                                   self.basis_tree)
 
672
                                                   self.basis_tree, None)
669
673
 
670
674
        # Report what was deleted. We could skip this when no deletes are
671
675
        # detected to gain a performance win, but it arguably serves as a
718
722
                # enforce repository nested tree policy.
719
723
                if (not self.work_tree.supports_tree_reference() or
720
724
                    # repository does not support it either.
721
 
                    not self.branch.repository._format.supports_tree_reference()):
 
725
                    not self.branch.repository._format.supports_tree_reference):
722
726
                    content_summary = ('directory',) + content_summary[1:]
723
727
            kind = content_summary[0]
724
728
            # TODO: specific_files filtering before nested tree processing
725
 
            if kind == 'tree-reference' and self.builder.recursive == 'down':
726
 
                self._commit_nested_tree(file_id, path)
 
729
            # TODO: push this down into record_entry so the new ie can be set
 
730
            # directly.
 
731
            if kind == 'tree-reference':
 
732
                if self.builder.recursive == 'down':
 
733
                    nested_revision_id = self._commit_nested_tree(
 
734
                        file_id, path)
 
735
                    content_summary = content_summary[:3] + (
 
736
                        nested_revision_id,)
 
737
                else:
 
738
                    content_summary = content_summary[:3] + (
 
739
                        self.work_tree.get_reference_revision(file_id),)
727
740
 
728
741
            # Record an entry for this item
729
742
            # Note: I don't particularly want to have the existing_ie
750
763
            sub_tree.branch.repository = \
751
764
                self.work_tree.branch.repository
752
765
        try:
753
 
            sub_tree.commit(message=None, revprops=self.revprops,
 
766
            return sub_tree.commit(message=None, revprops=self.revprops,
754
767
                recursive=self.builder.recursive,
755
768
                message_callback=self.message_callback,
756
769
                timestamp=self.timestamp, timezone=self.timezone,
759
772
                strict=self.strict, verbose=self.verbose,
760
773
                local=self.local, reporter=self.reporter)
761
774
        except errors.PointlessCommit:
762
 
            pass
 
775
            return self.work_tree.get_reference_revision(file_id)
763
776
 
764
777
    def _record_entry(self, path, file_id, specific_files, kind, name,
765
778
        parent_id, definitely_changed, existing_ie, content_summary):