diff --git a/gclient.py b/gclient.py index 242cf0f2f..f71eccc4c 100755 --- a/gclient.py +++ b/gclient.py @@ -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) diff --git a/gclient_scm.py b/gclient_scm.py index 85d0d5032..ba49f050c 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -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 diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py index babd133fb..5f5af69b6 100755 --- a/tests/gclient_scm_test.py +++ b/tests/gclient_scm_test.py @@ -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(