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/06/14 00:36:40 UTC

[1/6] lucene-solr:master: Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring t

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5_5 508f8f83e -> bd3aa4590
  refs/heads/branch_5x 1dff75c64 -> 312429e80
  refs/heads/branch_6_0 608ae7111 -> b9ea5e3ac
  refs/heads/branch_6_1 112b7f308 -> 04a6efc0b
  refs/heads/branch_6x 03838732c -> 816b50202
  refs/heads/master a2a1bd2a4 -> 843adfb7b


Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 3) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/843adfb7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/843adfb7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/843adfb7

Branch: refs/heads/master
Commit: 843adfb7ba136f092eddb2b2da95b38e17804533
Parents: a2a1bd2
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:13:14 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 solr/CHANGES.txt                    | 23 +++++++++++++++++----
 3 files changed, 51 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/843adfb7/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 630e86f..cc41116 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -184,14 +186,38 @@ def read_config():
   print ("branch_type is %s " % c.branch_type)
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config() 
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if c.matching_branch:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/843adfb7/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/843adfb7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 82b8760..e2a7112 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -47,9 +47,14 @@ Optimizations
 
 ==================  6.2.0 ==================
 
-
-Upgrading from Solr any prior release
-----------------------
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.12.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.3.8.v20160314
 
 Detailed Change List
 ----------------------
@@ -59,7 +64,6 @@ New Features
 
 * SOLR-9187: Support dates and booleans in /export handler, support boolean DocValues fields
 
-
 Bug Fixes
 ----------------------
 
@@ -72,6 +76,17 @@ Bug Fixes
 
 ==================  6.1.0 ==================
 
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.12.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.3.8.v20160314
+
 Upgrading from Solr any prior release
 ----------------------
 


[2/6] lucene-solr:branch_6x: Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referrin

Posted by sa...@apache.org.
Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 3) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/816b5020
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/816b5020
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/816b5020

Branch: refs/heads/branch_6x
Commit: 816b5020257ade2a4644df2723ccffaac9650112
Parents: 0383873
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:17:59 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 solr/CHANGES.txt                    | 22 ++++++++++++++++++---
 3 files changed, 51 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/816b5020/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 630e86f..cc41116 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -184,14 +186,38 @@ def read_config():
   print ("branch_type is %s " % c.branch_type)
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config() 
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if c.matching_branch:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/816b5020/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/816b5020/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e021666..c5bbc32 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -18,8 +18,14 @@ See the Quick Start guide at http://lucene.apache.org/solr/quickstart.html
 
 ==================  6.2.0 ==================
 
-Upgrading from Solr any prior release
-----------------------
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.12.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.3.8.v20160314
 
 Detailed Change List
 ----------------------
@@ -29,7 +35,6 @@ New Features
 
 * SOLR-9187: Support dates and booleans in /export handler, support boolean DocValues fields
 
-
 Bug Fixes
 ----------------------
 
@@ -39,6 +44,17 @@ Bug Fixes
 
 ==================  6.1.0 ==================
 
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.12.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.3.8.v20160314
+
 Upgrading from Solr any prior release
 ----------------------
 


[5/6] lucene-solr:branch_5x: Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated f

Posted by sa...@apache.org.
Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 2) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/312429e8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/312429e8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/312429e8

Branch: refs/heads/branch_5x
Commit: 312429e80655389ff32d7b7f979139af12e7cdeb
Parents: 1dff75c
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:25:39 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 2 files changed, 32 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/312429e8/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 6a4d68c..99761da 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -184,6 +186,30 @@ def read_config():
     parser.error('Adding minor release on master branch requires --changeid')
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config()
@@ -193,8 +219,8 @@ def main():
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if not c.changeid:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/312429e8/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any


[6/6] lucene-solr:branch_5_5: Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated

Posted by sa...@apache.org.
Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 2) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/bd3aa459
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bd3aa459
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bd3aa459

Branch: refs/heads/branch_5_5
Commit: bd3aa45904c27271f97e3fb1f65f77c5dea3cefb
Parents: 508f8f8
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:26:35 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 2 files changed, 32 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bd3aa459/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 414e4a1..4b78c8d 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -185,14 +187,38 @@ def read_config():
     parser.error('Adding minor release on master branch requires --changeid')
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config() 
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if not c.changeid:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bd3aa459/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any


[4/6] lucene-solr:branch_6_0: Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated

Posted by sa...@apache.org.
Address Solr Changes.html problems: 1) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 2) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b9ea5e3a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b9ea5e3a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b9ea5e3a

Branch: refs/heads/branch_6_0
Commit: b9ea5e3ac12a82fa9e9230da8deb9d26be60bf6e
Parents: 608ae71
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:23:22 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 2 files changed, 32 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b9ea5e3a/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 630e86f..cc41116 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -184,14 +186,38 @@ def read_config():
   print ("branch_type is %s " % c.branch_type)
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config() 
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if c.matching_branch:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b9ea5e3a/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any


[3/6] lucene-solr:branch_6_1: Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referri

Posted by sa...@apache.org.
Address Solr Changes.html problems: 1) In solr/CHANGES.txt, add a 'Versions of Major Components' section to the 6.2.0 and 6.1.0 releases; 2) In addVersion.py: when adding a new version to solr/CHANGES.txt, add a line referring to LUCENE_CHANGES.txt, and add a 'Versions of Major Components' section with versions interpolated from ivy-versions.properties; and 3) In changes2html.pl: allow section names to have up to 6 words (to handle 'Upgrading from Solr any prior release')


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/04a6efc0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/04a6efc0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/04a6efc0

Branch: refs/heads/branch_6_1
Commit: 04a6efc0b19d3175c015d5abedb0ede418682f61
Parents: 112b7f3
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Jun 13 20:13:14 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 13 20:21:30 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py     | 34 ++++++++++++++++++++++++++++----
 lucene/site/changes/changes2html.pl |  4 ++--
 solr/CHANGES.txt                    | 11 +++++++++++
 3 files changed, 43 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/04a6efc0/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 630e86f..cc41116 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -20,8 +20,10 @@ from scriptutil import *
 
 import argparse
 import re
+from configparser import ConfigParser, ExtendedInterpolation
+from textwrap import dedent
 
-def update_changes(filename, new_version):
+def update_changes(filename, new_version, init_changes = '(No Changes)\n\n'):
   print('  adding new section to %s...' % filename, end='', flush=True)
   matcher = re.compile(r'\d+\.\d+\.\d+\s+===')
   def edit(buffer, match, line):
@@ -30,7 +32,7 @@ def update_changes(filename, new_version):
     match = new_version.previous_dot_matcher.search(line)
     if match is not None:
       buffer.append(line.replace(match.group(0), new_version.dot))
-      buffer.append('(No Changes)\n\n')
+      buffer.append(init_changes)
     buffer.append(line)
     return match is not None
      
@@ -184,14 +186,38 @@ def read_config():
   print ("branch_type is %s " % c.branch_type)
 
   return c
+
+# Hack ConfigParser, designed to parse INI files, to parse & interpolate Java .properties files
+def parse_properties_file(filename):
+  contents = open(filename, encoding='ISO-8859-1').read().replace('%', '%%') # Escape interpolation metachar
+  parser = ConfigParser(interpolation=ExtendedInterpolation())               # Handle ${property-name} interpolation
+  parser.read_string("[DUMMY_SECTION]\n" + contents)                         # Add required section
+  return dict(parser.items('DUMMY_SECTION'))
+
+def get_solr_init_changes():
+  return dedent('''
+    Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+    Versions of Major Components
+    ---------------------
+    Apache Tika %(org.apache.tika.version)s
+    Carrot2 %(/org.carrot2/carrot2-mini)s
+    Velocity %(/org.apache.velocity/velocity)s and Velocity Tools %(/org.apache.velocity/velocity-tools)s
+    Apache UIMA %(org.apache.uima.version)s
+    Apache ZooKeeper %(/org.apache.zookeeper/zookeeper)s
+    Jetty %(org.eclipse.jetty.version)s
+
+
+    (No Changes)\n\n
+    ''' % parse_properties_file('lucene/ivy-versions.properties'))
   
 def main():
   c = read_config() 
 
   print('\nAdding new version %s' % c.version)
   update_changes('lucene/CHANGES.txt', c.version)
-  update_changes('solr/CHANGES.txt', c.version)
-  add_constant(c.version, not c.matching_branch) 
+  update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
+  add_constant(c.version, not c.matching_branch)
 
   if c.matching_branch:
     print('\nUpdating latest version')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/04a6efc0/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index 5399930..d71f296 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -117,10 +117,10 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
   }
 
   # Section heading: no leading whitespace, initial word capitalized,
-  #                  five words or less, and no trailing punctuation, 
+  #                  six words or less, and no trailing punctuation,
   #                  except colons - don't match the one otherwise matching
   #                  non-section-name by excluding "StandardTokenizer"
-  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,4})(?<![-.;!()])\s*$/
+  if (    /^(?!.*StandardTokenizer)([A-Z]\S*(?:\s+\S+){0,5})(?<![-.;!()])\s*$/
       and not $in_major_component_versions_section) {
     my $heading = $1;
     $heading =~ s/:$//; # Strip trailing colon, if any

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/04a6efc0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 71497fb..9c9e26b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -18,6 +18,17 @@ See the Quick Start guide at http://lucene.apache.org/solr/quickstart.html
 
 ==================  6.1.0 ==================
 
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.12.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.3.8.v20160314
+
 Upgrading from Solr any prior release
 ----------------------