Эх сурвалжийг харах

Don't prompt for confirmation in `git cl upload --dependencies`

This is a pretty intentional command, I don't see why the confirmation
would be required.

Bug: None
Change-Id: I111bb39e3b5f467901be5c986847ace3c6efa7ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4261467
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Victor Hugo Vianna Silva 2 жил өмнө
parent
commit
dd03016926

+ 0 - 4
git_cl.py

@@ -3871,10 +3871,6 @@ def upload_branch_deps(cl, args, force=False):
     print('There are no dependent local branches for %s' % root_branch)
     print('There are no dependent local branches for %s' % root_branch)
     return 0
     return 0
 
 
-  if not force:
-    confirm_or_exit('This command will checkout all dependent branches and run '
-                    '"git cl upload".', action='continue')
-
   # Record all dependents that failed to upload.
   # Record all dependents that failed to upload.
   failures = {}
   failures = {}
   # Go through all dependents, checkout the branch and upload.
   # Go through all dependents, checkout the branch and upload.

+ 0 - 5
tests/git_cl_test.py

@@ -1945,11 +1945,6 @@ class TestGitCl(unittest.TestCase):
     ret = git_cl.upload_branch_deps(MockChangelist(), [])
     ret = git_cl.upload_branch_deps(MockChangelist(), [])
     # CMDupload should have been called 5 times because of 5 dependent branches.
     # CMDupload should have been called 5 times because of 5 dependent branches.
     self.assertEqual(5, len(git_cl.CMDupload.mock_calls))
     self.assertEqual(5, len(git_cl.CMDupload.mock_calls))
-    self.assertIn(
-        'This command will checkout all dependent branches '
-        'and run "git cl upload". Press Enter to continue, '
-        'or Ctrl+C to abort',
-        sys.stdout.getvalue())
     self.assertEqual(0, ret)
     self.assertEqual(0, ret)
 
 
   def test_gerrit_change_id(self):
   def test_gerrit_change_id(self):