Explorar el Código

[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 hace 2 años
padre
commit
bcb9577a46
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  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' %
       print('\nLocal merge base %s is different from Gerrit %s.\n' %
             (local_base, external_base))
             (local_base, external_base))
       if git_common.upstream(branch):
       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.
     # Fetch Gerrit's CL base if it doesn't exist locally.
     remote, _ = self.GetRemoteBranch()
     remote, _ = self.GetRemoteBranch()