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
diff --git a/git_cache.py b/git_cache.py
index 60dfa1c..0f66de7 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -439,16 +439,9 @@
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()