5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 06:10:18 +08:00

SQOOP-1427: Sqoop2: Add support for branch SQOOP-1367 to pre-commit build

This commit is contained in:
Abraham Elmahrek 2014-08-11 15:05:35 -07:00
parent 3c93930bf3
commit 26c0e8b884

View File

@ -44,7 +44,9 @@ def sqoop_guess_branch(versions):
for v in versions: for v in versions:
tmp_branch = None tmp_branch = None
if v.startswith("1.99") or v.startswith("2.0"): if v.startswith("from/to"):
tmp_branch = "SQOOP-1367"
elif v.startswith("1.99") or v.startswith("2.0"):
tmp_branch = "sqoop2" tmp_branch = "sqoop2"
else: else:
tmp_branch = "trunk" tmp_branch = "trunk"
@ -59,7 +61,7 @@ def sqoop_guess_branch(versions):
# Verify supported branch # Verify supported branch
def sqoop_verify_branch(branch): def sqoop_verify_branch(branch):
return branch in {"sqoop2", "SQOOP-1082"} return branch in {"sqoop2", "SQOOP-1082", "SQOOP-1367"}
def execute(cmd, log=True): def execute(cmd, log=True):
if log: if log:
@ -179,7 +181,7 @@ def git_checkout(result, branch):
result.fatal("git reset failed") result.fatal("git reset failed")
if execute("git fetch origin") != 0: if execute("git fetch origin") != 0:
result.fatal("git fetch failed") result.fatal("git fetch failed")
if execute("git merge --ff-only origin/sqoop2"): if execute("git merge --ff-only origin/%s" % (branch)):
result.fatal("git merge failed") result.fatal("git merge failed")
def git_apply(result, cmd, patch_file, strip, output_dir): def git_apply(result, cmd, patch_file, strip, output_dir):