Make upstream reupload error message clearer
BUG=643466
Change-Id: I6e27334401d541fc4b7b3196465497cab1a78029
Reviewed-on: https://chromium-review.googlesource.com/424968
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index e4909ec..5da4ebc 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2737,10 +2737,12 @@
if not parent or (RunGitSilent(['rev-parse', upstream_branch + ':']) !=
RunGitSilent(['rev-parse', parent + ':'])):
DieWithError(
- 'Upload upstream branch %s first.\n'
- 'Note: maybe you\'ve uploaded it with --no-squash. '
- 'If so, then re-upload it with:\n'
- ' git cl upload --squash\n' % upstream_branch_name)
+ '\nUpload upstream branch %s first.\n'
+ 'It is likely that this branch has been rebased since its last '
+ 'upload, so you just need to upload it again.\n'
+ '(If you uploaded it with --no-squash, then branch dependencies '
+ 'are not supported, and you should reupload with --squash.)'
+ % upstream_branch_name)
else:
parent = self.GetCommonAncestorWithUpstream()