Procházet zdrojové kódy

git_cache: print gsutil command.

Bug: 1370443
Change-Id: If2cf31982b13a1f6ec9bb9fd6dccb9095e209d63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3933833
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Joanna Wang před 2 roky
rodič
revize
2c54a19bd0
1 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 5 2
      git_cache.py

+ 5 - 2
git_cache.py

@@ -516,7 +516,6 @@ class Mirror(object):
         cwd=self.mirror_path).decode('utf-8', 'ignore').strip()
         cwd=self.mirror_path).decode('utf-8', 'ignore').strip()
     gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
     gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
 
 
-    src_name = self.mirror_path
     dest_prefix = '%s/%s' % (self._gs_path, gen_number)
     dest_prefix = '%s/%s' % (self._gs_path, gen_number)
 
 
     # ls_out lists contents in the format: gs://blah/blah/123...
     # ls_out lists contents in the format: gs://blah/blah/123...
@@ -560,11 +559,15 @@ class Mirror(object):
       # getting compressed enough.
       # getting compressed enough.
     self.RunGit(gc_args)
     self.RunGit(gc_args)
 
 
-    gsutil.call('-m', 'cp', '-r', src_name, dest_prefix)
+    self.print('running "gsutil -m cp -r %s %s"' %
+               (self.mirror_path, dest_prefix))
+    gsutil.call('-m', 'cp', '-r', self.mirror_path, dest_prefix)
 
 
     # Create .ready file and upload
     # Create .ready file and upload
     _, ready_file_name =  tempfile.mkstemp(suffix='.ready')
     _, ready_file_name =  tempfile.mkstemp(suffix='.ready')
     try:
     try:
+      self.print('running "gsutil cp %s %s.ready"' %
+                 (ready_file_name, dest_prefix))
       gsutil.call('cp', ready_file_name, '%s.ready' % (dest_prefix))
       gsutil.call('cp', ready_file_name, '%s.ready' % (dest_prefix))
     finally:
     finally:
       os.remove(ready_file_name)
       os.remove(ready_file_name)