mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
[git_cache] Fix shadowing for bootstrap
The `bootstrap` function within `populate` is shadowing the `bootstrap` argument. This causes the `_ensure_bootsrapped` function to receive a function pointer rather than passing along the boolean value. Bug: 326116358 Change-Id: I6c03eb8bfbbc3385e1e9e653e43fdf9416cd244f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5310976 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org> Auto-Submit: Kyle Farnung <kfarnung@microsoft.com>
This commit is contained in:
@@ -555,7 +555,7 @@ class Mirror(object):
|
||||
depth = 10000
|
||||
gclient_utils.safe_makedirs(self.GetCachePath())
|
||||
|
||||
def bootstrap(force=False):
|
||||
def bootstrap_cache(force=False):
|
||||
self._ensure_bootstrapped(depth,
|
||||
bootstrap,
|
||||
reset_fetch_config,
|
||||
@@ -572,12 +572,12 @@ class Mirror(object):
|
||||
wipe_cache()
|
||||
|
||||
try:
|
||||
bootstrap()
|
||||
bootstrap_cache()
|
||||
except ClobberNeeded:
|
||||
# This is a major failure, we need to clean and force a
|
||||
# bootstrap.
|
||||
wipe_cache()
|
||||
bootstrap(force=True)
|
||||
bootstrap_cache(force=True)
|
||||
|
||||
def update_bootstrap(self, prune=False, gc_aggressive=False):
|
||||
# NOTE: There have been cases where repos were being recursively
|
||||
|
||||
Reference in New Issue
Block a user