801
801
# Skip excluded paths. Excluded paths are processed by
802
802
# _update_builder_with_changes.
804
content_summary = self.work_tree.path_content_summary(path)
804
kind, executable = self.work_tree.get_kind_and_executable_by_path(
805
806
# Note that when a filter of specific files is given, we must only
806
807
# skip/record deleted files matching that filter.
807
808
if not specific_files or is_inside_any(specific_files, path):
808
if content_summary[0] == 'missing':
809
if kind == 'missing':
809
810
if not deleted_paths:
810
811
# path won't have been split yet.
811
812
path_segments = splitpath(path)
816
817
self._next_progress_entry()
817
818
deleted_ids.append(file_id)
819
# TODO: have the builder do the nested commit just-in-time IF and
821
if content_summary[0] == 'tree-reference':
820
# We don't want to use a contents_summary anymore, but it's still
821
# part of the contract of record_entry_contents, so we fake one
822
# with the right form: (kind, length, exec,
823
# sha_or_link_target_or_tree_revid)
824
if kind == 'symlink':
825
content_summary = (kind, None, None,
826
self.work_tree.get_symlink_target(file_id))
827
# TODO: specific_files filtering before nested tree processing
828
elif kind == 'tree-reference':
829
# TODO: have the builder do the nested commit just-in-time IF and
822
831
# enforce repository nested tree policy.
823
832
if (not self.work_tree.supports_tree_reference() or
824
833
# repository does not support it either.
825
834
not self.branch.repository._format.supports_tree_reference):
826
content_summary = ('directory',) + content_summary[1:]
827
kind = content_summary[0]
828
# TODO: specific_files filtering before nested tree processing
829
if kind == 'tree-reference':
830
if self.recursive == 'down':
836
content_summary = ('directory', None, None, None)
837
elif self.recursive == 'down':
831
838
nested_revision_id = self._commit_nested_tree(
833
content_summary = content_summary[:3] + (
840
content_summary = (kind, None, None, nested_revision_id)
836
content_summary = content_summary[:3] + (
837
self.work_tree.get_reference_revision(file_id),)
842
nested_revision_id = self.work_tree.get_reference_revision(file_id)
843
content_summary = (kind, None, None, nested_revision_id)
845
content_summary = (kind, None, executable, None)
847
content_summary = (kind, None, None, None)
839
849
# Record an entry for this item
840
850
# Note: I don't particularly want to have the existing_ie