diff --git a/gclient_scm.py b/gclient_scm.py index d79f07e92..80519d9bb 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -32,6 +32,12 @@ import shutil import subprocess2 +THIS_FILE_PATH = os.path.abspath(__file__) + +GSUTIL_DEFAULT_PATH = os.path.join( + os.path.dirname(os.path.abspath(__file__)), 'gsutil.py') + + class NoUsableRevError(gclient_utils.Error): """Raised if requested revision isn't found in checkout.""" diff --git a/git_cache.py b/git_cache.py index a20662be2..a76816da6 100755 --- a/git_cache.py +++ b/git_cache.py @@ -35,12 +35,6 @@ GC_AUTOPACKLIMIT = 50 GIT_CACHE_CORRUPT_MESSAGE = 'WARNING: The Git cache is corrupt.' -# gsutil creates many processes and threads. Creating too many gsutil cp -# processes may result in running out of resources, and may perform worse due to -# contextr switching. This limits how many concurrent gsutil cp processes -# git_cache runs. -GSUTIL_CP_SEMAPHORE = threading.Semaphore(2) - try: # pylint: disable=undefined-variable WinErr = WindowsError @@ -312,9 +306,8 @@ class Mirror(object): self.print('Downloading files in %s/* into %s.' % (latest_dir, tempdir)) with self.print_duration_of('download'): - with self.GSUTIL_CP_SEMAPHORE(): - code = gsutil.call('-m', 'cp', '-r', latest_dir + "/*", - tempdir) + code = gsutil.call('-m', 'cp', '-r', latest_dir + "/*", + tempdir) if code: return False # Set HEAD to main.