From c3900910f8fd0e86913c3e55e8b59ff7acda2b3f Mon Sep 17 00:00:00 2001 From: Abraham Elmahrek Date: Thu, 11 Dec 2014 22:43:53 -0600 Subject: [PATCH] SQOOP-1858: Sqoop2: Print out warnings from git apply on output of precommit hook (Jarek Jarcec Cecho via Abraham Elmahrek) --- dev-support/test-patch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py index e84ec2a1..a98dce4f 100755 --- a/dev-support/test-patch.py +++ b/dev-support/test-patch.py @@ -192,9 +192,10 @@ def git_apply(result, cmd, patch_file, strip, output_dir): with open(output_file) as fh: output = fh.read() if rc == 0: - result.success("Patch applied correctly") if output: - print output + result.success("Patch applied, but there has been warnings:\n{code}%s{code}\n" % (output)) + else: + result.success("Patch applied correctly") else: result.fatal("failed to apply patch (exit code %d):\n{code}%s{code}\n" % (rc, output))