From bcb9577a46b3b2c00ebb49e30b3ea9a3fdd3433a Mon Sep 17 00:00:00 2001 From: "mark a. foltz" Date: Fri, 5 May 2023 17:28:26 +0000 Subject: [PATCH] [depot_tools] Update messages for git cl upload. If a Gerrit issue has commits not available in the local branch, git cl upload will tell the user to run git rebase-update. That doesn't actually merge the Gerrit commits into the local branch though, so the message is misleading. Bug: 1441209 Change-Id: Ib30377ac3a0d87e5fcfc491759b10c3268883159 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4507644 Reviewed-by: Josip Sokcevic Commit-Queue: Mark Foltz --- git_cl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git_cl.py b/git_cl.py index 1213f7ab3a..a51f8783c2 100755 --- a/git_cl.py +++ b/git_cl.py @@ -3029,10 +3029,10 @@ class Changelist(object): print('\nLocal merge base %s is different from Gerrit %s.\n' % (local_base, external_base)) if git_common.upstream(branch): - DieWithError('Upstream branch set. Consider using `git rebase-update` ' - 'to make these the same.') - print('No upstream branch set. Consider setting it and using ' - '`git rebase-update`.\nContinuing upload with Gerrit merge base.') + confirm_or_exit('Can\'t apply the latest changes from Gerrit.\n' + 'Continue with upload and override the latest changes?') + return + print('No upstream branch set. Continuing upload with Gerrit merge base.') # Fetch Gerrit's CL base if it doesn't exist locally. remote, _ = self.GetRemoteBranch()