From dd03016926d59efb549f39ddc7a327e4553d4fef Mon Sep 17 00:00:00 2001 From: Victor Hugo Vianna Silva Date: Thu, 23 Feb 2023 17:55:06 +0000 Subject: [PATCH] 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 Auto-Submit: Victor Vianna Reviewed-by: Josip Sokcevic --- git_cl.py | 4 ---- tests/git_cl_test.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/git_cl.py b/git_cl.py index bc6046bb3..b1ba09619 100755 --- a/git_cl.py +++ b/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) 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. failures = {} # Go through all dependents, checkout the branch and upload. diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 91e23902c..115b0305e 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -1945,11 +1945,6 @@ class TestGitCl(unittest.TestCase): ret = git_cl.upload_branch_deps(MockChangelist(), []) # CMDupload should have been called 5 times because of 5 dependent branches. 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) def test_gerrit_change_id(self):