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/05/13 22:41:35 UTC

[1/4] lucene-solr:branch_6x: Improve addVersion.py: in Version.java, remove 'Use this to get the latest...' from the previous LATEST, and add it to the new LATEST

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 06d2f6368 -> c9f753570


Improve addVersion.py: in Version.java, remove 'Use this to get the latest...' from the previous LATEST, and add it to the new LATEST


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

Branch: refs/heads/branch_6x
Commit: 6e52d62f69c75ff160ee03a9ae0ddd6b03e4f6dd
Parents: 06d2f63
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 15:23:18 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri May 13 17:23:12 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6e52d62f/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index ccf1a49..300c9f9 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -48,28 +48,36 @@ def add_constant(new_version, deprecate):
     last = buffer[-1]
     if last.strip() != '@Deprecated':
       spaces = ' ' * (len(last) - len(last.lstrip()) - 1)
-      buffer[-1] = spaces + (' * @deprecated (%s) Use latest\n' % new_version)
-      buffer.append(spaces + ' */\n')
-      buffer.append(spaces + '@Deprecated\n')
+      del buffer[-1] # Remove comment closer line
+      if (len(buffer) >= 4 and re.search('for Lucene.\s*$', buffer[-1]) != None):
+        del buffer[-3:] # drop the trailing lines '<p> / Use this to get the latest ... / ... for Lucene.'
+      buffer.append(( '{0} * @deprecated ({1}) Use latest\n'
+                    + '{0} */\n'
+                    + '{0}@Deprecated\n').format(spaces, new_version))
 
   def buffer_constant(buffer, line):
     spaces = ' ' * (len(line) - len(line.lstrip()))
-    buffer.append('\n' + spaces + '/**\n')
-    buffer.append(spaces + ' * Match settings and bugs in Lucene\'s %s release.\n' % new_version)
+    buffer.append(( '\n{0}/**\n'
+                  + '{0} * Match settings and bugs in Lucene\'s {1} release.\n')
+                  .format(spaces, new_version))
     if deprecate:
-      buffer.append(spaces + ' * @deprecated Use latest\n')
-    buffer.append(spaces + ' */\n')
+      buffer.append('%s * @deprecated Use latest\n' % spaces)
+    else:
+      buffer.append(( '{0} * <p>\n'
+                    + '{0} * Use this to get the latest &amp; greatest settings, bug\n'
+                    + '{0} * fixes, etc, for Lucene.\n').format(spaces))
+    buffer.append('%s */\n' % spaces)
     if deprecate:
-      buffer.append(spaces + '@Deprecated\n')
-    buffer.append(spaces + 'public static final Version %s = new Version(%d, %d, %d);\n' %
-                  (new_version.constant, new_version.major, new_version.minor, new_version.bugfix))
+      buffer.append('%s@Deprecated\n' % spaces)
+    buffer.append('{0}public static final Version {1} = new Version({2}, {3}, {4});\n'.format
+                  (spaces, new_version.constant, new_version.major, new_version.minor, new_version.bugfix))
   
   class Edit(object):
     found = -1
     def __call__(self, buffer, match, line):
       if new_version.constant in line:
         return None # constant already exists
-      # outter match is just to find lines declaring version constants
+      # outer match is just to find lines declaring version constants
       match = prev_matcher.search(line)
       if match is not None:
         ensure_deprecated(buffer) # old version should be deprecated


[3/4] lucene-solr:branch_6x: LUCENE-7265: Pull change id related code out of addVersion.py; rename 'major' BranchType to 'unstable'

Posted by sa...@apache.org.
LUCENE-7265: Pull change id related code out of addVersion.py; rename 'major' BranchType to 'unstable'

Conflicts:
	dev-tools/scripts/addVersion.py


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

Branch: refs/heads/branch_6x
Commit: 82bad7883dfa8b34d9e1d505d989ddd398c1f62b
Parents: e9e8e3e
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 17:06:16 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri May 13 18:38:48 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py | 14 +++-----------
 dev-tools/scripts/scriptutil.py | 10 +++++-----
 2 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82bad788/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 300c9f9..630e86f 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -174,22 +174,14 @@ def check_solr_version_tests():
 def read_config():
   parser = argparse.ArgumentParser(description='Add a new version')
   parser.add_argument('version', type=Version.parse)
-  parser.add_argument('-c', '--changeid', type=str, help='Git ChangeId (commit hash) for downstream version change to merge')
   c = parser.parse_args()
 
   c.branch_type = find_branch_type()
   c.matching_branch = c.version.is_bugfix_release() and c.branch_type == BranchType.release or \
                       c.version.is_minor_release() and c.branch_type == BranchType.stable or \
-                      c.version.is_major_release() and c.branch_type == BranchType.major
+                      c.version.is_major_release() and c.branch_type == BranchType.unstable
 
-  if c.changeid and c.version.is_major_release():
-    parser.error('Cannot use --changeid for major release')
-  if c.changeid and c.matching_branch:
-    parser.error('Cannot use --changeid on branch that new version will originate on')
-  if c.version.is_bugfix_release() and c.branch_type in [BranchType.major, BranchType.stable] and not c.changeid:
-    parser.error('Adding bugfix release on master or stable branch requires --changeid')
-  if c.version.is_minor_release() and c.branch_type in [BranchType.major] and not c.changeid:
-    parser.error('Adding minor release on master branch requires --changeid')
+  print ("branch_type is %s " % c.branch_type)
 
   return c
   
@@ -201,7 +193,7 @@ def main():
   update_changes('solr/CHANGES.txt', c.version)
   add_constant(c.version, not c.matching_branch) 
 
-  if not c.changeid:
+  if c.matching_branch:
     print('\nUpdating latest version')
     update_build_version(c.version)
     update_latest_constant(c.version)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82bad788/dev-tools/scripts/scriptutil.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.py
index 419ccbe..84c39cd 100644
--- a/dev-tools/scripts/scriptutil.py
+++ b/dev-tools/scripts/scriptutil.py
@@ -94,11 +94,11 @@ def update_file(filename, line_re, edit):
     f.write(''.join(buffer))
   return True
 
-# branch types are "release", "stable" and "major"
+# branch types are "release", "stable" and "unstable"
 class BranchType(Enum):
-  major   = 1
-  stable  = 2
-  release = 3
+  unstable = 1
+  stable   = 2
+  release  = 3
 
 def find_branch_type():
   output = subprocess.check_output('git status', shell=True)
@@ -110,7 +110,7 @@ def find_branch_type():
     raise Exception('git status missing branch name')
 
   if branchName == b'master':
-    return BranchType.major
+    return BranchType.unstable
   if re.match(r'branch_(\d+)x', branchName.decode('UTF-8')):
     return BranchType.stable
   if re.match(r'branch_(\d+)_(\d+)', branchName.decode('UTF-8')):


[2/4] lucene-solr:branch_6x: addVersion.py (via scriptutil.py): fix name of the running script in error message

Posted by sa...@apache.org.
addVersion.py (via scriptutil.py): fix name of the running script in error message


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

Branch: refs/heads/branch_6x
Commit: e9e8e3ead9fea2e408b426e5ac7d63f2f72b2135
Parents: 6e52d62
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 15:36:31 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri May 13 17:23:37 2016 -0400

----------------------------------------------------------------------
 dev-tools/scripts/scriptutil.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e9e8e3ea/dev-tools/scripts/scriptutil.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.py
index 216bde4..419ccbe 100644
--- a/dev-tools/scripts/scriptutil.py
+++ b/dev-tools/scripts/scriptutil.py
@@ -115,7 +115,7 @@ def find_branch_type():
     return BranchType.stable
   if re.match(r'branch_(\d+)_(\d+)', branchName.decode('UTF-8')):
     return BranchType.release
-  raise Exception('Cannot run bumpVersion.py on feature branch')
+  raise Exception('Cannot run %s on feature branch' % sys.argv[0].rsplit('/', 1)[-1])
 
 version_prop_re = re.compile('version\.base=(.*)')
 def find_current_version():


[4/4] lucene-solr:branch_6x: Add version 6.0.1

Posted by sa...@apache.org.
Add version 6.0.1


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

Branch: refs/heads/branch_6x
Commit: c9f7535707e1ac9b8ff2a1f85bd9a5703080b83c
Parents: 82bad78
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 18:41:19 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri May 13 18:41:19 2016 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                                       | 3 +++
 lucene/core/src/java/org/apache/lucene/util/Version.java | 7 +++++++
 solr/CHANGES.txt                                         | 3 +++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9f75357/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 42510bb..0d419bc 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -130,6 +130,9 @@ Other
 * LUCENE-7263: Make queryparser/xml/CoreParser's SpanQueryBuilderFactory
   accessible to deriving classes. (Daniel Collins via Christine Poerschke)
 
+======================= Lucene 6.0.1 =======================
+(No Changes)
+
 ======================= Lucene 6.0.0 =======================
 
 System Requirements

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9f75357/lucene/core/src/java/org/apache/lucene/util/Version.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/Version.java b/lucene/core/src/java/org/apache/lucene/util/Version.java
index 85fe11c..2871526 100644
--- a/lucene/core/src/java/org/apache/lucene/util/Version.java
+++ b/lucene/core/src/java/org/apache/lucene/util/Version.java
@@ -119,6 +119,13 @@ public final class Version {
   public static final Version LUCENE_6_0_0 = new Version(6, 0, 0);
 
   /**
+   * Match settings and bugs in Lucene's 6.0.1 release.
+   * @deprecated Use latest
+   */
+  @Deprecated
+  public static final Version LUCENE_6_0_1 = new Version(6, 0, 1);
+
+  /**
    * Match settings and bugs in Lucene's 6.1.0 release.
    */
   public static final Version LUCENE_6_1_0 = new Version(6, 1, 0);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9f75357/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f55e08d..78a95e7 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -265,6 +265,9 @@ Other Changes
 
 * SOLR-9072: Migrate morphline-core tests to SolrCloudTestCase. (Alan Woodward)
 
+==================  6.0.1 ==================
+(No Changes)
+
 ==================  6.0.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release