From 3698acf32147a1a4b7f6fbe83c0741fc6a22cef0 Mon Sep 17 00:00:00 2001 From: Steve Rowe Date: Tue, 24 Oct 2017 12:27:55 -0400 Subject: [PATCH] addBackCompatIndexes.py: Don't generated sorted indexes for versions < 6.2 --- dev-tools/scripts/addBackcompatIndexes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev-tools/scripts/addBackcompatIndexes.py b/dev-tools/scripts/addBackcompatIndexes.py index e64dbfc0b9e..645dc26ba5c 100644 --- a/dev-tools/scripts/addBackcompatIndexes.py +++ b/dev-tools/scripts/addBackcompatIndexes.py @@ -103,7 +103,7 @@ def update_backcompat_tests(types, index_version, current_version): module = 'lucene/backward-codecs' filename = '%s/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java' % module if not current_version.is_back_compat_with(index_version): - matcher = re.compile(r'final String\[\] unsupportedNames = {|};'), + matcher = re.compile(r'final String\[\] unsupportedNames = {|};') elif 'sorted' in types: matcher = re.compile(r'final static String\[\] oldSortedNames = {|};') else: @@ -245,7 +245,8 @@ def main(): current_version = scriptutil.Version.parse(scriptutil.find_current_version()) create_and_add_index(source, 'cfs', c.version, current_version, c.temp_dir) create_and_add_index(source, 'nocfs', c.version, current_version, c.temp_dir) - create_and_add_index(source, 'sorted', c.version, current_version, c.temp_dir) + if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2): + create_and_add_index(source, 'sorted', c.version, current_version, c.temp_dir) if c.version.minor == 0 and c.version.bugfix == 0 and c.version.major < current_version.major: create_and_add_index(source, 'moreterms', c.version, current_version, c.temp_dir) create_and_add_index(source, 'dvupdates', c.version, current_version, c.temp_dir) @@ -254,7 +255,8 @@ def main(): print('\nAdding backwards compatibility tests') update_backcompat_tests(['cfs', 'nocfs'], c.version, current_version) - update_backcompat_tests(['sorted'], c.version, current_version) + if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2): + update_backcompat_tests(['sorted'], c.version, current_version) print('\nTesting changes') check_backcompat_tests()