Set default --lock_timeout to 5m
gclient-sync + git-cache are racy because if two different DEPS files
dependent on the same repo URL, even if depsed to different checkout
dirs, they use same git cache dir. If both checkout dirs are synced at
the same time, one of them cannot acquire a lock.
This is a cheap solution to change --lock_timeout option default value
from 0 to 5m.
R=hinoka@chromium.org
BUG=593468
Review URL: https://codereview.chromium.org/1785083005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299386 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index 5d0e412..c240d47 100755
--- a/gclient.py
+++ b/gclient.py
@@ -2050,9 +2050,9 @@
help='Don\'t bootstrap from Google Storage.')
parser.add_option('--ignore_locks', action='store_true',
help='GIT ONLY - Ignore cache locks.')
- parser.add_option('--lock_timeout', type='int', default=0,
+ parser.add_option('--lock_timeout', type='int', default=5000,
help='GIT ONLY - Deadline (in seconds) to wait for git '
- 'cache lock to become available.')
+ 'cache lock to become available. Default is %default.')
(options, args) = parser.parse_args(args)
client = GClient.LoadCurrentConfig(options)