Revert "git_cache: Remove locks"
This reverts commit c3eb3fa33551c957d0179472c908864da016d95a.
Reason for revert: lots of "runhooks" failure everywhere
Example: https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/92720
Original change's description:
> git_cache: Remove locks
>
> These aren't in use, and the original problem they were
> meant to solve has been solved at the gclient.py layer
> using resource locking:
> https://codereview.chromium.org/2049583003
>
> Bug: 773008
> Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
> Reviewed-on: https://chromium-review.googlesource.com/707728
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>
TBR=iannucci@chromium.org,hinoka@chromium.org,agable@chromium.org,phajdan.jr@chromium.org
Change-Id: I31d5fef94f39f3a9f97b9e59121073b1f433d11e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 773008
Reviewed-on: https://chromium-review.googlesource.com/711054
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
diff --git a/gclient_scm.py b/gclient_scm.py
index 208ac3a..cc03d8e 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -855,7 +855,10 @@
depth = None
mirror.populate(verbose=options.verbose,
bootstrap=not getattr(options, 'no_bootstrap', False),
- depth=depth)
+ depth=depth,
+ ignore_lock=getattr(options, 'ignore_locks', False),
+ lock_timeout=getattr(options, 'lock_timeout', 0))
+ mirror.unlock()
def _Clone(self, revision, url, options):
"""Clone a git repository from the given URL.