Add automatic auto-flushing stdout.
An automated work around for python lack of stdout flushing.
This design simplifies life once parallel checkout is enabled.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3342024
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58819 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index 7e6b878..d7f0209 100644
--- a/gclient.py
+++ b/gclient.py
@@ -1197,8 +1197,8 @@
options.entries_filename = options.config_filename + '_entries'
if options.jobs < 1:
parser.error('--jobs must be 1 or higher')
- # Useful for --jobs.
- options.stdout = sys.stdout
+ # Always autoflush so buildbot doesn't kill us during lengthy operations.
+ options.stdout = gclient_utils.StdoutAutoFlush(sys.stdout)
# These hacks need to die.
if not hasattr(options, 'revisions'):