... |
... |
@@ -401,6 +401,7 @@ class CasBasedDirectory(Directory): |
401
|
401
|
result = FileListResult()
|
402
|
402
|
processed_directories = set()
|
403
|
403
|
for f in files:
|
|
404
|
+ print("_partial_import_cas_into_cas: Importing {}".format(f))
|
404
|
405
|
if f == ".": continue
|
405
|
406
|
fullname = os.path.join(path_prefix, f)
|
406
|
407
|
components = f.split(os.path.sep)
|
... |
... |
@@ -523,6 +524,7 @@ class CasBasedDirectory(Directory): |
523
|
524
|
if files is None:
|
524
|
525
|
files = source_directory.list_relative_paths()
|
525
|
526
|
#return self._full_import_cas_into_cas(source_directory, can_hardlink=True)
|
|
527
|
+ print("Performing import of CAS into CAS. Files to import: {}".format(files))
|
526
|
528
|
return self._partial_import_cas_into_cas(source_directory, files)
|
527
|
529
|
|
528
|
530
|
def import_files(self, external_pathspec, *, files=None,
|
... |
... |
@@ -571,6 +573,7 @@ class CasBasedDirectory(Directory): |
571
|
573
|
source_directory = external_pathspec
|
572
|
574
|
if files is None:
|
573
|
575
|
files = list_relative_paths(source_directory)
|
|
576
|
+ print("Performing import from plain directory {}, containing {} files.".format(source_directory, len(list(files))))
|
574
|
577
|
result = self._import_files_from_directory(source_directory, files=files)
|
575
|
578
|
|
576
|
579
|
# TODO: No notice is taken of report_written, update_utimes or can_link.
|
... |
... |
@@ -715,11 +718,16 @@ class CasBasedDirectory(Directory): |
715
|
718
|
"""
|
716
|
719
|
|
717
|
720
|
filelist = []
|
|
721
|
+ print("list_relative_paths indexing CAS directory")
|
718
|
722
|
for (k, v) in self.index.items():
|
719
|
723
|
if isinstance(v.buildstream_object, CasBasedDirectory):
|
720
|
724
|
filelist.extend([k + os.path.sep + x for x in v.buildstream_object.list_relative_paths()])
|
|
725
|
+ print("Add directory {}".format(k))
|
721
|
726
|
elif isinstance(v.pb_object, remote_execution_pb2.FileNode):
|
722
|
727
|
filelist.append(k)
|
|
728
|
+ print("Add file {}".format(k))
|
|
729
|
+ else:
|
|
730
|
+ print("Unrecognised entry! {}".format(k))
|
723
|
731
|
return filelist
|
724
|
732
|
|
725
|
733
|
def recalculate_hash(self):
|