Merge "Provide an explanation on failed rebase"

This commit is contained in:
Jenkins 2015-05-28 00:22:31 +00:00 committed by Gerrit Code Review
commit 9b611d7b67
2 changed files with 9 additions and 0 deletions

View File

@ -789,6 +789,13 @@ def rebase_changes(branch, remote, interactive=True):
print("Errors running %s" % cmd)
if interactive:
print(output)
print("It is likely that your change has a merge conflict. "
"You may resolve it in the working tree now as "
"described above and then run 'git review' again, or "
"if you do not want to resolve it yet (note that the "
"change can not merge until the conflict is resolved) "
"you may run 'git rebase --abort' then 'git review -R' "
"to upload the change without rebasing.")
return False
return True

View File

@ -149,6 +149,8 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase):
exc = self.assertRaises(Exception, self._run_git_review)
self.assertIn("Errors running git rebase -p -i remotes/gerrit/master",
exc.args[0])
self.assertIn("It is likely that your change has a merge conflict.",
exc.args[0])
def test_upload_without_rebase(self):
"""Test change not needing a rebase can upload without rebasing."""