From 56a624ac5686f8b7ec0d69f3143bb83179c2bacc Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Wed, 26 Mar 2014 21:23:09 +0000 Subject: [PATCH] Fix the print of the rebase error message, and make the output prettier too. For some reason .output doesn't throw an AttributeError, but returns None , instead. .stdout is the correct attribute. R=agable@chromium.org BUG= Review URL: https://codereview.chromium.org/212493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259695 0039d316-1c4b-4281-b951-d872f2087c98 --- git_common.py | 2 +- git_rebase_update.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/git_common.py b/git_common.py index 284c18cea4..80398baa95 100644 --- a/git_common.py +++ b/git_common.py @@ -432,7 +432,7 @@ def rebase(parent, start, branch, abort=False): except subprocess2.CalledProcessError as cpe: if abort: run('rebase', '--abort') - return RebaseRet(False, cpe.output) + return RebaseRet(False, cpe.stdout) def remove_merge_base(branch): diff --git a/git_rebase_update.py b/git_rebase_update.py index 9d353c6de9..37f3066581 100755 --- a/git_rebase_update.py +++ b/git_rebase_update.py @@ -137,6 +137,9 @@ def rebase_branch(branch, parent, start_hash): else: # rebase and leave in mid-rebase state. git.rebase(parent, start_hash, branch) + print "Failed!" + print + print "Here's what git-rebase had to say:" print squash_ret.message print print textwrap.dedent(