Flush stdout before squash attempt

This change inserts a flush after "..." in lines like:

  Failed! Attempting to squash mybranch ... Failed!
and:
  Failed! Attempting to squash mybranch ... Success!

This way the user can follow the progress better and has an indication
of why the rebase is taking longer than they might expect.

Bug:
Change-Id: Ie04db2879fccd363d7b0f13b7a5217f1c13fd0e2
Reviewed-on: https://chromium-review.googlesource.com/737009
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrew Moylan <amoylan@chromium.org>
changes/09/737009/3
Andrew Moylan 8 years ago committed by Commit Bot
parent 83fd81f8a4
commit bfc4082f43

@ -161,6 +161,7 @@ def rebase_branch(branch, parent, start_hash):
if not rebase_ret.success: if not rebase_ret.success:
# TODO(iannucci): Find collapsible branches in a smarter way? # TODO(iannucci): Find collapsible branches in a smarter way?
print "Failed! Attempting to squash", branch, "...", print "Failed! Attempting to squash", branch, "...",
sys.stdout.flush()
squash_branch = branch+"_squash_attempt" squash_branch = branch+"_squash_attempt"
git.run('checkout', '-b', squash_branch) git.run('checkout', '-b', squash_branch)
git.squash_current_branch(merge_base=start_hash) git.squash_current_branch(merge_base=start_hash)

Loading…
Cancel
Save