|
@@ -607,9 +607,6 @@ class Mirror(object):
|
|
# The folder is <git number>
|
|
# The folder is <git number>
|
|
gen_number = subprocess.check_output(
|
|
gen_number = subprocess.check_output(
|
|
[self.git_exe, 'number', 'master'], cwd=self.mirror_path).strip()
|
|
[self.git_exe, 'number', 'master'], cwd=self.mirror_path).strip()
|
|
- # Run Garbage Collect to compress packfile.
|
|
|
|
- self.RunGit(['gc', '--prune=all'])
|
|
|
|
-
|
|
|
|
gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
|
|
gsutil = Gsutil(path=self.gsutil_exe, boto_path=None)
|
|
|
|
|
|
src_name = self.mirror_path
|
|
src_name = self.mirror_path
|
|
@@ -631,6 +628,9 @@ class Mirror(object):
|
|
print('Cache %s already exists' % dest_name)
|
|
print('Cache %s already exists' % dest_name)
|
|
return
|
|
return
|
|
|
|
|
|
|
|
+ # Run Garbage Collect to compress packfile.
|
|
|
|
+ self.RunGit(['gc', '--prune=all'])
|
|
|
|
+
|
|
gsutil.call('-m', 'cp', '-r', src_name, dest_name)
|
|
gsutil.call('-m', 'cp', '-r', src_name, dest_name)
|
|
|
|
|
|
#TODO(karenqian): prune old caches
|
|
#TODO(karenqian): prune old caches
|