Эх сурвалжийг харах

Update *_hash and *_is_first_class_gcs to be dotfiles

Bug: b/324418194
Change-Id: Iae22d6895c8a15d7be351ce0023bd2ada83292a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5441097
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Stephanie Kim 1 жил өмнө
parent
commit
3a30482282

+ 1 - 1
download_from_google_storage.py

@@ -48,7 +48,7 @@ def construct_migration_file_name(gcs_object_name):
     # Remove any extensions
     gcs_file_name = gcs_file_name.split('.')[0]
 
-    return gcs_file_name + MIGRATION_TOGGLE_FILE_SUFFIX
+    return f'.{gcs_file_name}{MIGRATION_TOGGLE_FILE_SUFFIX}'
 
 
 class InvalidFileError(IOError):

+ 1 - 1
gclient.py

@@ -2647,7 +2647,7 @@ class GcsDependency(Dependency):
 
         # Remove any forward slashes and drop any extensions
         hash_name = self.object_name.replace('/', '_').split('.')[0]
-        hash_file = os.path.join(output_dir, hash_name + '_hash')
+        hash_file = os.path.join(output_dir, f'.{hash_name}_hash')
         migration_toggle_file = os.path.join(
             output_dir,
             download_from_google_storage.construct_migration_file_name(

+ 0 - 13
tests/gclient_gcs_smoketest.py

@@ -35,27 +35,14 @@ class GClientSmokeGcs(gclient_smoketest_base.GClientSmokeBase):
 
         tree = self.mangle_git_tree(('repo_22@1', 'src'))
         tree.update({
-            'src/another_gcs_dep/Linux_llvmfile_hash':
-            'abcd123\n',
             'src/another_gcs_dep/llvmfile.tar.gz':
             'tarfile',
-            'src/another_gcs_dep/Linux_llvmfile_is_first_class_gcs':
-            '1\n',
             'src/another_gcs_dep/extracted_dir/extracted_file':
             'extracted text',
             'src/gcs_dep/deadbeef':
             'tarfile',
-            'src/gcs_dep/deadbeef_hash':
-            'abcd123\n',
-            'src/gcs_dep/deadbeef_is_first_class_gcs':
-            '1\n',
             'src/gcs_dep/extracted_dir/extracted_file':
             'extracted text',
-            'src/gcs_dep_with_output_file/clang-format-version123_hash':
-            'abcd123\n',
-            'src/gcs_dep_with_output_file/clang-format-version123_'
-            'is_first_class_gcs':
-            '1\n',
             'src/gcs_dep_with_output_file/clang-format-no-extract':
             'non-extractable file',
         })