From 3625c0e5ac9fa1f00a08a3587eb63f6e6ee66ffb Mon Sep 17 00:00:00 2001 From: Kevin Suo Date: Wed, 19 Feb 2020 11:19:16 +0800 Subject: Add support to ignore source commits based on description --- bibisect_build.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bibisect_build.py b/bibisect_build.py index 056051e..0208f72 100755 --- a/bibisect_build.py +++ b/bibisect_build.py @@ -44,11 +44,11 @@ log_dir = "/mnt/data/lo/bibisect_tool/log" # You do not need to change "start_commit" in each run of this script. # Commits whcih are already included in the "target" will be automatically ignored. -# 2020-02-08 22:53:48 +0100 Removed executable permission on file -start_commit = "dd0dda17c9984ce29b674f7ba903cd1d3fe73ab5" +# 2020-02-19-110640: 2020-02-19 - Fold chapter strings in to one pluralized string +start_commit = "791aeac1e492d3f3b6c99fa480226c0b2cc4f7d6" -# 2020-02-17 02:55:36 +0100 Fix UITest_options: changed property name -to_commit = "592bfa4d21e22ca5aa0ce228388558c52941b81a" +# master +to_commit = "master" # The file holding a list of source commits to be ignored in this process, # the format is: each commit hash one line. @@ -106,13 +106,28 @@ def generate_range_list(range_text): """ range_list = range_text.split(b"\n") commits = [] + ignore_msgs = [ + "drop unneeded include", + "Update git submodules", + "Unit test", + "UItest", + "UI Test", + "macos", + "mac os", + "android"] for range_item in range_list: commit_date, commit_time, commit_zone, commit_hash, commit_msg = \ range_item.split(b" ", maxsplit=4) commit_date, commit_time, commit_zone, commit_hash, commit_msg = \ commit_date.decode(), commit_time.decode(), commit_zone.decode(), \ commit_hash.decode(), commit_msg.decode() - commits.append([commit_date, commit_time, commit_zone, commit_hash, commit_msg]) + ignore = False + for ignore_msg in ignore_msgs: + if ignore_msg.upper() in commit_msg.upper(): + ignore = True + break + if not ignore: + commits.append([commit_date, commit_time, commit_zone, commit_hash, commit_msg]) return commits -- cgit