mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Use the same git-cache bucket for authenticated and unauthenticated repos.
We should only be maintaining one cache bundle per repo, but it turns out that we've had two in the past due to GoB supporting two different paths to the repo, and users were getting stale bundles as a result. This CL fixes things so that we should only get a single bundle per repo. Bug: 935084 Change-Id: I0d6713280a2abbc20e35ff87e7be115870dd5140 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1566431 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Dirk Pranke <dpranke@chromium.org>
This commit is contained in:
@@ -264,6 +264,10 @@ class Mirror(object):
|
||||
norm_url = parsed.netloc + parsed.path
|
||||
if norm_url.endswith('.git'):
|
||||
norm_url = norm_url[:-len('.git')]
|
||||
|
||||
# Use the same dir for authenticated URLs and unauthenticated URLs.
|
||||
norm_url = norm_url.replace('googlesource.com/a/', 'googlesource.com/')
|
||||
|
||||
return norm_url.replace('-', '--').replace('/', '-').lower()
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user