Chromium Code Reviews| Index: git_cache.py | 
| diff --git a/git_cache.py b/git_cache.py | 
| index 957ae9529c83454a78566fd54d031abf20392b66..271f38ccf52f30f83773fbcfc532748e51156d63 100755 | 
| --- a/git_cache.py | 
| +++ b/git_cache.py | 
| @@ -143,7 +143,6 @@ class Mirror(object): | 
| gsutil_exe = os.path.join( | 
| os.path.dirname(os.path.abspath(__file__)), | 
| 'third_party', 'gsutil', 'gsutil') | 
| - bootstrap_bucket = 'chromium-git-cache' | 
| def __init__(self, url, refs=None, print_func=None): | 
| self.url = url | 
| @@ -152,6 +151,12 @@ class Mirror(object): | 
| self.mirror_path = os.path.join(self.GetCachePath(), self.basedir) | 
| self.print = print_func or print | 
| + def bootstrap_bucket(self): | 
| 
 
agable
2014/06/05 00:45:27
make it an @property?
 
 | 
| + if 'chrome-internal' in self.url: | 
| + return 'chrome-git-cache' | 
| + else: | 
| + return 'chromium-git-cache' | 
| + | 
| @classmethod | 
| def FromPath(cls, path): | 
| return cls(cls.CacheDirToUrl(path)) | 
| @@ -245,7 +250,7 @@ class Mirror(object): | 
| elif not self.FindExecutable('unzip'): | 
| python_fallback = True | 
| - gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket, self.basedir) | 
| + gs_folder = 'gs://%s/%s' % (self.bootstrap_bucket(), self.basedir) | 
| 
 
agable
2014/06/05 00:45:27
Then this could go away
 
 | 
| gsutil = Gsutil( | 
| self.gsutil_exe, boto_path=os.devnull, bypass_prodaccess=True) | 
| # Get the most recent version of the zipfile. | 
| @@ -353,7 +358,7 @@ class Mirror(object): | 
| subprocess.call(['zip', '-r', tmp_zipfile, '.'], cwd=self.mirror_path) | 
| gsutil = Gsutil(path=self.gsutil_exe, boto_path=None) | 
| dest_name = 'gs://%s/%s/%s.zip' % ( | 
| - self.bootstrap_bucket, self.basedir, gen_number) | 
| + self.bootstrap_bucket(), self.basedir, gen_number) | 
| gsutil.call('cp', tmp_zipfile, dest_name) | 
| os.remove(tmp_zipfile) |