You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2016/09/13 15:39:58 UTC
[2/5] lucene-solr:branch_6x: LUCENE-7446: don't ask about version
back-compatibility when we know it's not applicable (i.e.,
the version to be added is greater than the latest on the branch)
LUCENE-7446: don't ask about version back-compatibility when we know it's not applicable (i.e., the version to be added is greater than the latest on the branch)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5d65deca
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5d65deca
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5d65deca
Branch: refs/heads/branch_6x
Commit: 5d65deca53e51d7b0ed131686a0ad7adab543f73
Parents: ce1f0d9
Author: Steve Rowe <sa...@gmail.com>
Authored: Tue Sep 13 11:25:00 2016 -0400
Committer: Steve Rowe <sa...@gmail.com>
Committed: Tue Sep 13 11:25:22 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/addVersion.py | 39 ++++++++++++++++++------------------
1 file changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5d65deca/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index e95a51f..5ce6bde 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -176,14 +176,14 @@ def check_solr_version_tests():
def read_config(current_version):
parser = argparse.ArgumentParser(description='Add a new version')
parser.add_argument('version', type=Version.parse)
- c = parser.parse_args()
+ newconf = parser.parse_args()
- c.branch_type = find_branch_type()
- c.is_latest_version = c.version.on_or_after(current_version)
+ newconf.branch_type = find_branch_type()
+ newconf.is_latest_version = newconf.version.on_or_after(current_version)
- print ("branch_type is %s " % c.branch_type)
+ print ("branch_type is %s " % newconf.branch_type)
- return c
+ return newconf
# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
def parse_properties_file(filename):
@@ -211,30 +211,29 @@ def get_solr_init_changes():
def main():
current_version = Version.parse(find_current_version())
- c = read_config(current_version)
+ newconf = read_config(current_version)
- print('\nAdding new version %s' % c.version)
- update_changes('lucene/CHANGES.txt', c.version)
- update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+ print('\nAdding new version %s' % newconf.version)
+ update_changes('lucene/CHANGES.txt', newconf.version)
+ update_changes('solr/CHANGES.txt', newconf.version, get_solr_init_changes())
- is_back_compat = current_version.major == c.version.major or current_version.is_back_compat_with(c.version)
-
- if is_back_compat:
- add_constant(c.version, not c.is_latest_version)
+ latest_or_backcompat = newconf.is_latest_version or current_version.is_back_compat_with(newconf.version)
+ if latest_or_backcompat:
+ add_constant(newconf.version, not newconf.is_latest_version)
else:
- print('\nNot adding constant for version %s because it is no longer supported' % c.version)
+ print('\nNot adding constant for version %s because it is no longer supported' % newconf.version)
- if c.is_latest_version:
+ if newconf.is_latest_version:
print('\nUpdating latest version')
- update_build_version(c.version)
- update_latest_constant(c.version)
- update_example_solrconfigs(c.version)
+ update_build_version(newconf.version)
+ update_latest_constant(newconf.version)
+ update_example_solrconfigs(newconf.version)
- if c.version.is_major_release():
+ if newconf.version.is_major_release():
print('\nTODO: ')
print(' - Move backcompat oldIndexes to unsupportedIndexes in TestBackwardsCompatibility')
print(' - Update IndexFormatTooOldException throw cases')
- elif is_back_compat:
+ elif latest_or_backcompat:
print('\nTesting changes')
check_lucene_version_tests()
check_solr_version_tests()