Chromium Code Reviews| Index: git_cl/git_cl.py |
| diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py |
| index c6df47b95a6f46e8bfd4d13b4007ae2c81cdccfd..b43f7c83524ebc4752115798c1687d285012b9f6 100644 |
| --- a/git_cl/git_cl.py |
| +++ b/git_cl/git_cl.py |
| @@ -758,6 +758,8 @@ def RunHook(committing, upstream_branch, rietveld_server, tbr, may_prompt): |
| if not output.should_continue(): |
| sys.exit(1) |
| + return output |
| + |
| def CMDpresubmit(parser, args): |
| """run presubmit tests on the current changelist""" |
| @@ -830,10 +832,10 @@ def CMDupload(parser, args): |
| base_branch = cl.GetUpstreamBranch() |
| args = [base_branch + "..."] |
| - if not options.bypass_hooks: |
| + if not options.bypass_hooks and not options.force: |
|
M-A Ruel
2011/03/15 19:11:57
What's the difference between --force and --bypass
chase
2011/03/15 20:48:58
IIRC, originally --bypass_hooks was to not run thi
|
| hook_results = RunHook(committing=False, upstream_branch=base_branch, |
| rietveld_server=cl.GetRietveldServer(), tbr=False, |
| - may_prompt=(not options.force)) |
| + may_prompt=True) |
| if not options.reviewers and hook_results.reviewers: |
| options.reviewers = hook_results.reviewers |
| @@ -981,12 +983,11 @@ def SendUpstream(parser, args, cmd): |
| 'before attempting to %s.' % (base_branch, cmd)) |
| return 1 |
| - if not options.bypass_hooks: |
| + if not options.bypass_hooks and not options.force: |
| RunHook(committing=True, upstream_branch=base_branch, |
| rietveld_server=cl.GetRietveldServer(), tbr=options.tbr, |
| - may_prompt=(not options.force)) |
| + may_prompt=True) |
| - if not options.force and not options.bypass_hooks: |
| if cmd == 'dcommit': |
| # Check the tree status if the tree status URL is set. |
| status = GetTreeStatus() |