From 73449b0bd49eab1e152f419102123d734896da98 Mon Sep 17 00:00:00 2001 From: tandrii Date: Wed, 14 Sep 2016 06:27:24 -0700 Subject: [PATCH] Gerrit git cl land: abort if not uploaded. R=agable@chromium.org BUG=642759,609225 Review-Url: https://codereview.chromium.org/2317253003 --- git_cl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git_cl.py b/git_cl.py index 2af462423..cf626f5a4 100755 --- a/git_cl.py +++ b/git_cl.py @@ -4026,6 +4026,10 @@ def SendUpstream(parser, args, cmd): 'the contributor\'s "name ". If you can\'t upload such a ' 'commit for review, contact your repository admin and request' '"Forge-Author" permission.') + if not cl.GetIssue(): + DieWithError('You must upload the issue first to Gerrit.\n' + ' 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)