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 21:30:01 UTC

lucene-solr:branch_6_0: LUCENE-7265: Pull change id related code out of addVersion.py; rename 'major' BranchType to 'unstable'

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 75aabbc06 -> 21433af40


LUCENE-7265: Pull change id related code out of addVersion.py; rename 'major' BranchType to 'unstable'


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

Branch: refs/heads/branch_6_0
Commit: 21433af4029de39f905a243b1bb6f19985708d22
Parents: 75aabbc
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 17:06:16 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/21433af4/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 12769a7..630e86f 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -174,23 +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
 
   print ("branch_type is %s " % c.branch_type)
-  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')
 
   return c
   
@@ -202,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/21433af4/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')):