~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-08-28 06:40:33 UTC
  • mfrom: (4596.1.7 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090828064033-q7eyzxnnyc3jcpag
(mbp) merge 1.18 and 2.0 back to trunk; bump version to 2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
805
805
                # _update_builder_with_changes.
806
806
                continue
807
807
            content_summary = self.work_tree.path_content_summary(path)
 
808
            kind = content_summary[0]
808
809
            # Note that when a filter of specific files is given, we must only
809
810
            # skip/record deleted files matching that filter.
810
811
            if not specific_files or is_inside_any(specific_files, path):
811
 
                if content_summary[0] == 'missing':
 
812
                if kind == 'missing':
812
813
                    if not deleted_paths:
813
814
                        # path won't have been split yet.
814
815
                        path_segments = splitpath(path)
821
822
                    continue
822
823
            # TODO: have the builder do the nested commit just-in-time IF and
823
824
            # only if needed.
824
 
            if content_summary[0] == 'tree-reference':
 
825
            if kind == 'tree-reference':
825
826
                # enforce repository nested tree policy.
826
827
                if (not self.work_tree.supports_tree_reference() or
827
828
                    # repository does not support it either.
828
829
                    not self.branch.repository._format.supports_tree_reference):
829
 
                    content_summary = ('directory',) + content_summary[1:]
830
 
            kind = content_summary[0]
831
 
            # TODO: specific_files filtering before nested tree processing
832
 
            if kind == 'tree-reference':
833
 
                if self.recursive == 'down':
 
830
                    kind = 'directory'
 
831
                    content_summary = (kind, None, None, None)
 
832
                elif self.recursive == 'down':
834
833
                    nested_revision_id = self._commit_nested_tree(
835
834
                        file_id, path)
836
 
                    content_summary = content_summary[:3] + (
837
 
                        nested_revision_id,)
 
835
                    content_summary = (kind, None, None, nested_revision_id)
838
836
                else:
839
 
                    content_summary = content_summary[:3] + (
840
 
                        self.work_tree.get_reference_revision(file_id),)
 
837
                    nested_revision_id = self.work_tree.get_reference_revision(file_id)
 
838
                    content_summary = (kind, None, None, nested_revision_id)
841
839
 
842
840
            # Record an entry for this item
843
841
            # Note: I don't particularly want to have the existing_ie