Chromium Code Reviews| Index: git_rebase_update.py |
| diff --git a/git_rebase_update.py b/git_rebase_update.py |
| index 53e0287dd4663423a7ab8897df27e6aaa19910b0..a87e5eb5a7b95751813229bfe27cbd820abc34ff 100755 |
| --- a/git_rebase_update.py |
| +++ b/git_rebase_update.py |
| @@ -148,30 +148,34 @@ def rebase_branch(branch, parent, start_hash): |
| git.squash_current_branch(merge_base=start_hash) |
| git.rebase(parent, start_hash, branch) |
| else: |
| + print "Failed!" |
| + |
| # rebase and leave in mid-rebase state. |
| # This second rebase attempt should always fail in the same |
| # way that the first one does. If it magically succeeds then |
| # something very strange has happened. |
| second_rebase_ret = git.rebase(parent, start_hash, branch) |
| - assert(not second_rebase_ret.success) |
| - print "Failed!" |
| - print "Here's what git-rebase (squashed) had to say:" |
| - print squash_ret.stdout |
| - print squash_ret.stderr |
| - print textwrap.dedent( |
| - """\ |
| - Squashing failed. You probably have a real merge conflict. |
| - |
| - Your working copy is in mid-rebase. Either: |
| - * completely resolve like a normal git-rebase; OR |
| - * abort the rebase and mark this branch as dormant: |
| - git config branch.%s.dormant true |
| - |
| - And then run `git rebase-update` again to resume. |
| - """ % branch) |
| - return False |
| + if second_rebase_ret.success: |
| + print "Second rebase succeeded. First one failed with:" |
| + print rebase_ret.stderr |
|
iannucci
2014/10/23 00:42:07
do we want to have a blurb to report this on the b
Sam Clegg
2014/10/24 20:01:24
Done.
|
| + else: |
| + print "Here's what git-rebase (squashed) had to say:" |
| + print squash_ret.stdout |
| + print squash_ret.stderr |
| + print textwrap.dedent( |
| + """\ |
| + Squashing failed. You probably have a real merge conflict. |
| + |
| + Your working copy is in mid-rebase. Either: |
| + * completely resolve like a normal git-rebase; OR |
| + * abort the rebase and mark this branch as dormant: |
| + git config branch.%s.dormant true |
| + |
| + And then run `git rebase-update` again to resume. |
| + """ % branch) |
| + return False |
| else: |
| print '%s up-to-date' % branch |