mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
bot_update: Use 'gclient' from same repository.
Currently, 'bot_update' uses the 'gclient' that is on the system path. Now, it will use the 'gclient.py' that is in the same 'depot_tools' checkout as the 'bot_update' recipe module. Also don't ignore "git_cache" move errors. BUG=664254,663990,663440 TEST=None Review-Url: https://codereview.chromium.org/2492963002
This commit is contained in:
13
git_cache.py
13
git_cache.py
@@ -439,16 +439,9 @@ class Mirror(object):
|
||||
self._fetch(tempdir or self.mirror_path, verbose, depth)
|
||||
finally:
|
||||
if tempdir:
|
||||
try:
|
||||
if os.path.exists(self.mirror_path):
|
||||
gclient_utils.rmtree(self.mirror_path)
|
||||
os.rename(tempdir, self.mirror_path)
|
||||
except OSError as e:
|
||||
# This is somehow racy on Windows.
|
||||
# Catching OSError because WindowsError isn't portable and
|
||||
# pylint complains.
|
||||
self.print('Error moving %s to %s: %s' % (tempdir, self.mirror_path,
|
||||
str(e)))
|
||||
if os.path.exists(self.mirror_path):
|
||||
gclient_utils.rmtree(self.mirror_path)
|
||||
os.rename(tempdir, self.mirror_path)
|
||||
if not ignore_lock:
|
||||
lockfile.unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user