From 0d8a6ca5678f024dd874fe932469db94e088ea88 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 3 Sep 2024 17:15:00 +0200 Subject: [PATCH 1/2] Update common files --- common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.json b/common.json index 5e15b35f..467c4edf 100644 --- a/common.json +++ b/common.json @@ -4,7 +4,7 @@ "Jsonnet files should not include this file directly but use ci/common.jsonnet instead." ], - "mx_version": "7.28.0", + "mx_version": "7.29.5", "COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet", "jdks": { From 00ed9792d27eb23187921d7c2c924f0a2e81e2a4 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 3 Sep 2024 15:56:31 +0200 Subject: [PATCH 2/2] [GR-56803] Add mx checkcopyrights --assume-modified * Some usages with --file-list expect files dates to be checked with git log, so we need a new option to differentiate both use cases, that one and the use case of a git hook passing a subset of modified files. * --list-dir always has this behavior, for compatibility. --- .../src/com/oracle/mxtool/checkcopy/CheckCopyright.java | 4 +++- src/mx/_impl/mx.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/com.oracle.mxtool.checkcopy/src/com/oracle/mxtool/checkcopy/CheckCopyright.java b/java/com.oracle.mxtool.checkcopy/src/com/oracle/mxtool/checkcopy/CheckCopyright.java index 7247725c..eb73816f 100644 --- a/java/com.oracle.mxtool.checkcopy/src/com/oracle/mxtool/checkcopy/CheckCopyright.java +++ b/java/com.oracle.mxtool.checkcopy/src/com/oracle/mxtool/checkcopy/CheckCopyright.java @@ -504,6 +504,8 @@ private static void initCopyrightKinds() throws IOException { private static final Options options = new Options(); private static final Option help = Options.newBooleanOption("help", false, "Show help message and exit."); private static final Option COPYRIGHT_DIR = Options.newStringOption("copyright-dir", null, "override default location of copyright files"); + private static final Option ASSUME_MODIFIED = Options.newBooleanOption("assumed-modified", false, + "assume the given files are modified and so the last year should be current year. Always the case for --list-dir."); private static final Option> FILES_TO_CHECK = Options.newStringListOption("files", null, "list of files to check"); private static final Option FILE_LIST = Options.newStringOption("file-list", null, "file containing list of files to check"); private static final Option DIR_WALK = Options.newBooleanOption("list-dir", false, "check all files in directory tree requiring a copyright (ls -R)"); @@ -767,7 +769,7 @@ private static void processFile(Calendar cal, String fileName) { System.out.println("checking " + fileName); } Info info; - if (DIR_WALK.getValue() || FILE_LIST.getValue() != null) { + if (DIR_WALK.getValue() || ASSUME_MODIFIED.getValue()) { info = getFromLastModified(cal, fileName); } else { final List logInfo = vc.log(fileName); diff --git a/src/mx/_impl/mx.py b/src/mx/_impl/mx.py index 34bf7e3f..def98502 100755 --- a/src/mx/_impl/mx.py +++ b/src/mx/_impl/mx.py @@ -18196,7 +18196,7 @@ def alarm_handler(signum, frame): _CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache')) # The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue -version = VersionSpec("7.29.5") # GR-57584 +version = VersionSpec("7.29.6") # GR-56803 _mx_start_datetime = datetime.utcnow()