Commit 75ee7258 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

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 <ehmaldonado@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 58330b0d
......@@ -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,
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment