|
|
@ -143,7 +143,6 @@ class Mirror(object):
|
|
|
|
gsutil_exe = os.path.join(
|
|
|
|
gsutil_exe = os.path.join(
|
|
|
|
os.path.dirname(os.path.abspath(__file__)),
|
|
|
|
os.path.dirname(os.path.abspath(__file__)),
|
|
|
|
'third_party', 'gsutil', 'gsutil')
|
|
|
|
'third_party', 'gsutil', 'gsutil')
|
|
|
|
bootstrap_bucket = 'chromium-git-cache'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, url, refs=None, print_func=None):
|
|
|
|
def __init__(self, url, refs=None, print_func=None):
|
|
|
|
self.url = url
|
|
|
|
self.url = url
|
|
|
@ -152,6 +151,13 @@ class Mirror(object):
|
|
|
|
self.mirror_path = os.path.join(self.GetCachePath(), self.basedir)
|
|
|
|
self.mirror_path = os.path.join(self.GetCachePath(), self.basedir)
|
|
|
|
self.print = print_func or print
|
|
|
|
self.print = print_func or print
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
|
|
|
def bootstrap_bucket(self):
|
|
|
|
|
|
|
|
if 'chrome-internal' in self.url:
|
|
|
|
|
|
|
|
return 'chrome-git-cache'
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return 'chromium-git-cache'
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
|
def FromPath(cls, path):
|
|
|
|
def FromPath(cls, path):
|
|
|
|
return cls(cls.CacheDirToUrl(path))
|
|
|
|
return cls(cls.CacheDirToUrl(path))
|
|
|
|