Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Side by Side Diff: gclient_utils.py

Issue 8161009: Restore 103787 (fix git progress message), and update test expectations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generic utils.""" 5 """Generic utils."""
6 6
7 import errno 7 import errno
8 import logging 8 import logging
9 import os 9 import os
10 import Queue 10 import Queue
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 in_line = '' 353 in_line = ''
354 while in_byte: 354 while in_byte:
355 if in_byte != '\r': 355 if in_byte != '\r':
356 if print_stdout: 356 if print_stdout:
357 stdout.write(in_byte) 357 stdout.write(in_byte)
358 if in_byte != '\n': 358 if in_byte != '\n':
359 in_line += in_byte 359 in_line += in_byte
360 else: 360 else:
361 filter_fn(in_line) 361 filter_fn(in_line)
362 in_line = '' 362 in_line = ''
363 else:
364 filter_fn(in_line)
365 in_line = ''
363 in_byte = kid.stdout.read(1) 366 in_byte = kid.stdout.read(1)
364 # Flush the rest of buffered output. This is only an issue with 367 # Flush the rest of buffered output. This is only an issue with
365 # stdout/stderr not ending with a \n. 368 # stdout/stderr not ending with a \n.
366 if len(in_line): 369 if len(in_line):
367 filter_fn(in_line) 370 filter_fn(in_line)
368 rv = kid.wait() 371 rv = kid.wait()
369 except KeyboardInterrupt: 372 except KeyboardInterrupt:
370 print >> sys.stderr, 'Failed while running "%s"' % ' '.join(args) 373 print >> sys.stderr, 'Failed while running "%s"' % ' '.join(args)
371 raise 374 raise
372 375
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 logging.info('Caught exception in thread %s' % self.item.name) 670 logging.info('Caught exception in thread %s' % self.item.name)
668 logging.info(str(sys.exc_info())) 671 logging.info(str(sys.exc_info()))
669 work_queue.exceptions.put(sys.exc_info()) 672 work_queue.exceptions.put(sys.exc_info())
670 logging.info('_Worker.run(%s) done' % self.item.name) 673 logging.info('_Worker.run(%s) done' % self.item.name)
671 674
672 work_queue.ready_cond.acquire() 675 work_queue.ready_cond.acquire()
673 try: 676 try:
674 work_queue.ready_cond.notifyAll() 677 work_queue.ready_cond.notifyAll()
675 finally: 678 finally:
676 work_queue.ready_cond.release() 679 work_queue.ready_cond.release()
OLDNEW
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698