瀏覽代碼

[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 <sokcevic@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
mark a. foltz 2 年之前
父節點
當前提交
bcb9577a46
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      git_cl.py

+ 4 - 4
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()