From 75ee7258f8aa9cb163e0b58f0aa0a4d5dfaf5c8b Mon Sep 17 00:00:00 2001 From: Olivier Robin Date: Fri, 13 Apr 2018 10:02:56 +0200 Subject: [PATCH] Fix call to RunHook in CMDLand After https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/994241 RunHooks take a parallel parameter. This call was not fixed in initial CL. TBR=agable@chromium.org Change-Id: Ic2a076afbd8ef61e3bb12473f43e1e7eab273825 Reviewed-on: https://chromium-review.googlesource.com/1011613 Commit-Queue: Edward Lesmes Reviewed-by: Edward Lesmes --- git_cl.py | 7 ++++--- tests/git_cl_test.py | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/git_cl.py b/git_cl.py index 40bca132c..a58ceae4f 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2716,7 +2716,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): raise return data - def CMDLand(self, force, bypass_hooks, verbose): + def CMDLand(self, force, bypass_hooks, verbose, parallel): if git_common.is_dirty_git_tree('land'): return 1 detail = self._GetChangeDetail(['CURRENT_REVISION', 'LABELS']) @@ -2749,7 +2749,8 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): committing=True, may_prompt=not force, verbose=verbose, - change=self.GetChange(self.GetCommonAncestorWithUpstream(), None)) + change=self.GetChange(self.GetCommonAncestorWithUpstream(), None), + parallel=parallel) if not hook_results.should_continue(): return 1 @@ -5151,7 +5152,7 @@ def CMDland(parser, args): ' If you would rather have `git cl land` upload ' 'automatically for you, see http://crbug.com/642759') return cl._codereview_impl.CMDLand(options.force, options.bypass_hooks, - options.verbose) + options.verbose, options.parallel) def PushToGitWithAutoRebase(remote, branch, original_description, diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index ee6fe3b42..b138c65d4 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -2928,7 +2928,10 @@ class TestGitCl(TestCase): cl._codereview_impl.SubmitIssue = lambda wait_for_merge: None out = StringIO.StringIO() self.mock(sys, 'stdout', out) - self.assertEqual(0, cl.CMDLand(force=True, bypass_hooks=True, verbose=True)) + self.assertEqual(0, cl.CMDLand(force=True, + bypass_hooks=True, + verbose=True, + parallel=False)) self.assertRegexpMatches(out.getvalue(), 'Issue.*123 has been submitted') self.assertRegexpMatches(out.getvalue(), 'Landed as: .*deadbeef')