From d9e8710b912e6b75e332820b122ab6a2d6ccca05 Mon Sep 17 00:00:00 2001 From: Jarek Jarcec Cecho Date: Sun, 16 Jun 2013 12:32:04 -0700 Subject: [PATCH] Verify correct branch --- dev-support/test-patch.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py index e90c3246..8a01a16e 100755 --- a/dev-support/test-patch.py +++ b/dev-support/test-patch.py @@ -52,6 +52,10 @@ def sqoop_guess_branch(versions): return branch +# Verify supported branch +def sqoop_verify_branch(branch): + return branch in {"sqoop2", "SQOOP-1082"} + def execute(cmd, log=True): if log: print "INFO: Executing %s" % (cmd) @@ -355,6 +359,10 @@ def post_jira_comment_and_exit(): else: raise Exception("Not reachable") +# Verify that we are on supported branch +if not sqoop_verify_branch(branch): + print "ERROR: Unsupported branch %s" % (branch) + mvn_clean(result, output_dir) git_checkout(result, branch) git_apply(result, patch_cmd, patch_file, strip, output_dir)