Return 1 from git_cl land when you Ctrl-C it in the middle.
R=agable@chromium.org, mmoss@chromium.org
BUG=
Review URL: https://codereview.chromium.org/549513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291823 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index b8263b5..0185c38 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2052,6 +2052,7 @@
print 'Failed to push. If this persists, please file a bug.'
return 1
+ killed = False
if pushed_to_pending:
try:
revision = WaitForRealCommit(remote, revision, base_branch, branch)
@@ -2059,7 +2060,7 @@
# real ref.
pushed_to_pending = False
except KeyboardInterrupt:
- pass
+ killed = True
if cl.GetIssue():
to_pending = ' to pending queue' if pushed_to_pending else ''
@@ -2096,7 +2097,7 @@
if os.path.isfile(hook):
RunCommand([hook, merge_base], error_ok=True)
- return 0
+ return 1 if killed else 0
def WaitForRealCommit(remote, pushed_commit, local_base_ref, real_ref):