You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ab...@apache.org on 2014/12/23 08:02:32 UTC
sqoop git commit: SQOOP-1894: Sqoop2: Print out files that failed
license check in pre-commit hook
Repository: sqoop
Updated Branches:
refs/heads/sqoop2 7f53eb22e -> 20279e315
SQOOP-1894: Sqoop2: Print out files that failed license check in pre-commit hook
(Jarek Jarcec Cecho via Abraham Elmahrek)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/20279e31
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/20279e31
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/20279e31
Branch: refs/heads/sqoop2
Commit: 20279e31599cb813bb753898f34ad79328c5cf2d
Parents: 7f53eb2
Author: Abraham Elmahrek <ab...@apache.org>
Authored: Mon Dec 22 23:01:36 2014 -0800
Committer: Abraham Elmahrek <ab...@apache.org>
Committed: Mon Dec 22 23:02:21 2014 -0800
----------------------------------------------------------------------
dev-support/test-patch.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/20279e31/dev-support/test-patch.py
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py
index 4aa9af1..604be00 100755
--- a/dev-support/test-patch.py
+++ b/dev-support/test-patch.py
@@ -219,7 +219,20 @@ def mvn_rat(result, output_dir):
if rc == 0:
result.success("License check passed")
else:
- result.fatal("Failed to run license check (exit code %d)" % (rc))
+ incorrect_files = []
+ for path in list(find_all_files(".")):
+ file_name = os.path.basename(path)
+ if file_name == "rat.txt":
+ fd = open(path)
+ for line in fd:
+ if "!?????" in line:
+ matcher = re.search("\!\?\?\?\?\? (.*)$", line)
+ if matcher:
+ incorrect_files += [ matcher.groups()[0] ]
+ fd.close()
+ for incorrect_file in set(incorrect_files):
+ result.error("File {{%s}} have missing licence header" % (incorrect_file))
+ result.error("Failed to run license check (exit code %d)" % (rc))
def mvn_install(result, output_dir):
rc = execute("mvn install -DskipTests 1>%s/install.txt 2>&1" % output_dir)