You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:38:39 UTC
[buildstream] 08/20: Fixes to print statements - only use generator
once
This is an automated email from the ASF dual-hosted git repository.
root pushed a commit to branch jmac/virtual_directory_tests
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 4bdf5121b985b65bf55c719f211bcb50faac906d
Author: Jim MacArthur <ji...@codethink.co.uk>
AuthorDate: Sun Sep 16 10:56:30 2018 +0100
Fixes to print statements - only use generator once
---
buildstream/storage/_casbaseddirectory.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index 5a811bb..6da605e 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -572,8 +572,8 @@ class CasBasedDirectory(Directory):
else:
source_directory = external_pathspec
if files is None:
- files = list_relative_paths(source_directory)
- print("Performing import from plain directory {}, containing {} files.".format(source_directory, len(list(files))))
+ files = list(list_relative_paths(source_directory))
+ print("Performing import from plain directory {}, containing {} files: {}".format(source_directory, len(files), files))
result = self._import_files_from_directory(source_directory, files=files)
# TODO: No notice is taken of report_written, update_utimes or can_link.
@@ -591,7 +591,7 @@ class CasBasedDirectory(Directory):
if duplicate_cas:
if duplicate_cas.ref.hash != self.ref.hash:
raise VirtualDirectoryError("Mismatch between file-imported result {} and cas-to-cas imported result {}.".format(duplicate_cas.ref.hash,self.ref.hash))
-
+ print("Import complete; new hash is {}".format(self.ref.hash))
return result
def set_deterministic_mtime(self):