Merge "Provide an explanation on failed rebase"
This commit is contained in:
commit
9b611d7b67
@ -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
|
||||
|
||||
|
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user