Commit 41da24bf authored by szager@chromium.org's avatar szager@chromium.org

Set default nag_timer=6, and make it disable-able.

BUG=242220

Review URL: https://codereview.chromium.org/15367008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201859 0039d316-1c4b-4281-b951-d872f2087c98
parent f1db6d74
......@@ -1700,6 +1700,10 @@ def Parser():
help='create a gclient file containing the provided '
'string. Due to Cygwin/Python brokenness, it '
'probably can\'t contain any newlines.')
parser.add_option('--no-nag-max', default=False, action='store_true',
help='If a subprocess runs for too long without generating'
' terminal output, generate warnings, but do not kill'
' the process.')
# Integrate standard options processing.
old_parser = parser.parse_args
def Parse(args):
......@@ -1730,6 +1734,8 @@ def Parser():
options.manually_grab_svn_rev = None
if not hasattr(options, 'force'):
options.force = None
if options.no_nag_max:
gclient_scm.SCMWrapper.nag_max = None
return (options, args)
parser.parse_args = Parse
# We don't want wordwrapping in epilog (usually examples)
......
......@@ -121,7 +121,7 @@ class SCMWrapper(object):
This is the abstraction layer to bind to different SCM.
"""
nag_timer = 30
nag_max = 3
nag_max = 6
def __init__(self, url=None, root_dir=None, relpath=None):
self.url = url
......
......@@ -498,7 +498,7 @@ class SVNWrapperTestCase(BaseTestCase):
gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(
['svn', 'checkout', '--depth', 'empty', self.url, self.base_path],
always=True,
nag_max=3,
nag_max=6,
nag_timer=30,
cwd=self.root_dir)
gclient_scm.scm.SVN.RunAndGetFileList(
......@@ -534,7 +534,7 @@ class SVNWrapperTestCase(BaseTestCase):
files_list = self.mox.CreateMockAnything()
gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(
['svn', 'export', join(self.url, 'DEPS'), join(self.base_path, 'DEPS')],
nag_timer=30, nag_max=3, always=True, cwd=self.root_dir)
nag_timer=30, nag_max=6, always=True, cwd=self.root_dir)
self.mox.ReplayAll()
scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
......@@ -567,7 +567,7 @@ class SVNWrapperTestCase(BaseTestCase):
gclient_scm.gclient_utils.CheckCallAndFilterAndHeader(
['svn', 'checkout', '--depth', 'empty', self.url, self.base_path],
always=True,
nag_max=3,
nag_max=6,
nag_timer=30,
cwd=self.root_dir)
gclient_scm.scm.SVN.RunAndGetFileList(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment