805
805
# _update_builder_with_changes.
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)
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':
831
content_summary = (kind, None, None, None)
832
elif self.recursive == 'down':
834
833
nested_revision_id = self._commit_nested_tree(
836
content_summary = content_summary[:3] + (
835
content_summary = (kind, None, None, nested_revision_id)
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)
842
840
# Record an entry for this item
843
841
# Note: I don't particularly want to have the existing_ie