Delete nag_max and nag_timer

It's impossible to sync by default on Windows and has been since this was
added: https://www.google.com/search?q=chromium-dev+nag_max

Most recently: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/CEpATyu9udc

So, remove it. If someone needs it they can figure out a more targeted
implementation.

Keep --no-nag-max for backwards compat so that bot scripts won't fail out.
I'll remove it from bot scripts after this has baked a while, and then
come back and remove the option.

R=iannucci@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24950002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225730 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index e3c504a..80eb816 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -407,7 +407,7 @@
 
 def CheckCallAndFilter(args, stdout=None, filter_fn=None,
                        print_stdout=None, call_filter_on_first_line=False,
-                       nag_timer=None, nag_max=None, **kwargs):
+                       **kwargs):
   """Runs a command and calls back a filter function if needed.
 
   Accepts all subprocess2.Popen() parameters plus:
@@ -431,21 +431,6 @@
   # Do a flush of stdout before we begin reading from the subprocess2's stdout
   stdout.flush()
 
-  nag = None
-  if nag_timer:
-    # Hack thread.index to force correct annotation.
-    index = getattr(threading.currentThread(), 'index', 0)
-    def _nag_cb(elapsed):
-      setattr(threading.currentThread(), 'index', index)
-      stdout.write('  No output for %.0f seconds from command:\n' % elapsed)
-      stdout.write('    %s\n' % kid.cmd_str)
-      if (nag_max and
-          int('%.0f' % (elapsed / nag_timer)) >= nag_max):
-        stdout.write('  ... killing it!\n')
-        kid.kill()
-    nag = subprocess2.NagTimer(nag_timer, _nag_cb)
-    nag.start()
-
   # Also, we need to forward stdout to prevent weird re-ordering of output.
   # This has to be done on a per byte basis to make sure it is not buffered:
   # normally buffering is done for each line, but if svn requests input, no
@@ -453,8 +438,6 @@
   try:
     in_byte = kid.stdout.read(1)
     if in_byte:
-      if nag:
-        nag.event()
       if call_filter_on_first_line:
         filter_fn(None)
       in_line = ''
@@ -471,8 +454,6 @@
           filter_fn(in_line)
           in_line = ''
         in_byte = kid.stdout.read(1)
-        if in_byte and nag:
-          nag.event()
       # Flush the rest of buffered output. This is only an issue with
       # stdout/stderr not ending with a \n.
       if len(in_line):
@@ -486,9 +467,6 @@
   except KeyboardInterrupt:
     print >> sys.stderr, 'Failed while running "%s"' % ' '.join(args)
     raise
-  finally:
-    if nag:
-      nag.cancel()
 
   if rv:
     raise subprocess2.CalledProcessError(