You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/03/10 09:59:39 UTC
[lucene] 26/50: addBackCompatIndexes.py: Don't generated sorted
indexes for versions < 6.2
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch branch_7_1
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit da1c5fa5ace7c696105c4de957d97d9832f09838
Author: Steve Rowe <sa...@apache.org>
AuthorDate: Tue Oct 24 12:27:55 2017 -0400
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 08257ea..7a36002 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()