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/21 04:05:05 UTC
[01/14] lucene-solr:branch_5x: 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_5x 5c3fcda73 -> 75975019b
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/71e42e15
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/71e42e15
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/71e42e15
Branch: refs/heads/branch_5x
Commit: 71e42e153d0b7c40ca7fd66afd47585ae462b9be
Parents: 5c3fcda
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 15:23:18 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 20 21:17:17 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/71e42e15/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 99761da..470e277 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -50,28 +50,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 & 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
[03/14] lucene-solr:branch_5x: Revert "LUCENE-7265: Fix addVersion to
cherry-pick downstream changes by using the change id"
Posted by sa...@apache.org.
Revert "LUCENE-7265: Fix addVersion to cherry-pick downstream changes by using the change id"
This reverts commit 54b873c2f9b401687c18010aee31c35bcab9660e.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/62488b09
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/62488b09
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/62488b09
Branch: refs/heads/branch_5x
Commit: 62488b093d3bfd431cec19f91465f599527c0091
Parents: ab49db2
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 16:33:06 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 20 22:16:25 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/addVersion.py | 5 +----
dev-tools/scripts/scriptutil.py | 5 -----
2 files changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/62488b09/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 470e277..685546e 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -220,10 +220,7 @@ def get_solr_init_changes():
''' % parse_properties_file('lucene/ivy-versions.properties'))
def main():
- c = read_config()
-
- if c.changeid:
- cherry_pick_change(c.changeid)
+ c = read_config()
print('\nAdding new version %s' % c.version)
update_changes('lucene/CHANGES.txt', c.version)
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/62488b09/dev-tools/scripts/scriptutil.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.py
index b3cb963..419ccbe 100644
--- a/dev-tools/scripts/scriptutil.py
+++ b/dev-tools/scripts/scriptutil.py
@@ -121,11 +121,6 @@ version_prop_re = re.compile('version\.base=(.*)')
def find_current_version():
return version_prop_re.search(open('lucene/version.properties').read()).group(1)
-def cherry_pick_change(changeid):
- print('\nCherry-picking downstream change %s...' % changeid, end='')
- run('git cherry-pick %s' % changeid)
- print('done')
-
if __name__ == '__main__':
print('This is only a support module, it cannot be run')
sys.exit(1)
[11/14] lucene-solr:branch_5x: - In help text,
show default RC number. - In help text,
state that the default --root value is '.' (the current directory)
Posted by sa...@apache.org.
- In help text, show default RC number.
- In help text, state that the default --root value is '.' (the current directory)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fc136a41
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fc136a41
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fc136a41
Branch: refs/heads/branch_5x
Commit: fc136a412351d3f5f7adbf79669a4926ecb5ebaa
Parents: 7d16af9
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:55:51 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:04:20 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fc136a41/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 12fb799..1bf0854 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -181,9 +181,9 @@ def parse_config():
parser.add_argument('--sign', metavar='KEYID',
help='Sign the release with the given gpg key')
parser.add_argument('--rc-num', metavar='NUM', type=int, default=1,
- help='Release Candidate number, required')
- parser.add_argument('--root', metavar='WORKING_TREE_PATH', default='.',
- help='Root of Git working tree for lucene-solr')
+ help='Release Candidate number. Default: 1')
+ parser.add_argument('--root', metavar='PATH', default='.',
+ help='Root of Git working tree for lucene-solr. Default: "." (the current directory)')
config = parser.parse_args()
if not config.prepare and config.sign:
[09/14] lucene-solr:branch_5x: Fix current branch detection
Posted by sa...@apache.org.
Fix current branch detection
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/bfab7870
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bfab7870
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bfab7870
Branch: refs/heads/branch_5x
Commit: bfab7870bdf01456a4d1e0df29eb78ac62996911
Parents: 7a101ee
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:44:11 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:03:54 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bfab7870/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index de50d32..07ac6d4 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -61,7 +61,7 @@ def getGitRev():
status = os.popen('git status').read().strip()
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
- branch = os.popen('git rev-parse --abbrev-ref HEAD')
+ branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
unpushedCommits = os.popen('git log origin/%s..' % branch).read().strip()
if len(unpushedCommits) > 0:
raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)
[08/14] lucene-solr:branch_5x: Check for unpushed commits only on the
current branch
Posted by sa...@apache.org.
Check for unpushed commits only on the current 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/7a101ee8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7a101ee8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7a101ee8
Branch: refs/heads/branch_5x
Commit: 7a101ee80dbbf4fa96be24054011078d89d2304c
Parents: a9e7727
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:40:44 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:03:34 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a101ee8/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 46be0fe..de50d32 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -61,7 +61,8 @@ def getGitRev():
status = os.popen('git status').read().strip()
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
- unpushedCommits = os.popen('git log origin..').read().strip()
+ branch = os.popen('git rev-parse --abbrev-ref HEAD')
+ unpushedCommits = os.popen('git log origin/%s..' % branch).read().strip()
if len(unpushedCommits) > 0:
raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)
[13/14] lucene-solr:branch_5x: fix smokeTestRelease.py directory
interpolation
Posted by sa...@apache.org.
fix smokeTestRelease.py directory interpolation
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/530f2615
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/530f2615
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/530f2615
Branch: refs/heads/branch_5x
Commit: 530f2615fa442b615a8afaec644d3f10dc86b262
Parents: 99ead9b
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 16:50:02 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:04:37 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/530f2615/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 199a494..5945044 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -242,7 +242,7 @@ def main():
print('Next run the smoker tester:')
p = re.compile(".*/")
m = p.match(sys.argv[0])
- print('%s -u %(s)smokeTestRelease.py %s' % (sys.executable, m.group(), url))
+ print('%s -u %ssmokeTestRelease.py %s' % (sys.executable, m.group(), url))
if __name__ == '__main__':
try:
[07/14] lucene-solr:branch_5x: os.isdir => os.path.isdir
Posted by sa...@apache.org.
os.isdir => os.path.isdir
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a9e77271
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a9e77271
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a9e77271
Branch: refs/heads/branch_5x
Commit: a9e772713489760d11abe6bb2011fdfc008296d7
Parents: 4275312
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:32:20 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:03:19 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a9e77271/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 8da13d3..46be0fe 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -195,7 +195,7 @@ def parse_config():
cwd = os.getcwd()
os.chdir(config.root)
config.root = os.getcwd() # Absolutize root dir
- if os.system('git rev-parse') or 3 != len([d for d in ('dev-tools','lucene','solr') if os.isdir(d)]):
+ if os.system('git rev-parse') or 3 != len([d for d in ('dev-tools','lucene','solr') if os.path.isdir(d)]):
parser.error('Root path "%s" is not a valid lucene-solr checkout' % config.root)
os.chdir(cwd)
[02/14] lucene-solr:branch_5x: 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/ab49db26
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ab49db26
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ab49db26
Branch: refs/heads/branch_5x
Commit: ab49db26671424f1474acd3904c04b8aef62b1c3
Parents: 71e42e1
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 15:36:31 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Jun 20 21:17:31 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/ab49db26/dev-tools/scripts/scriptutil.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.py
index f10bf97..b3cb963 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():
[04/14] lucene-solr:branch_5x: 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'
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/82cb5c69
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/82cb5c69
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/82cb5c69
Branch: refs/heads/branch_5x
Commit: 82cb5c696e32760ebaba35e3db5ed097b2e142bd
Parents: 62488b0
Author: Steve Rowe <sa...@apache.org>
Authored: Fri May 13 17:06:16 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:02:19 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/addVersion.py | 16 ++++------------
dev-tools/scripts/scriptutil.py | 10 +++++-----
2 files changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82cb5c69/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 685546e..cc4dc5e 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -176,22 +176,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
@@ -218,7 +210,7 @@ def get_solr_init_changes():
(No Changes)\n\n
''' % parse_properties_file('lucene/ivy-versions.properties'))
-
+
def main():
c = read_config()
@@ -227,7 +219,7 @@ def main():
update_changes('solr/CHANGES.txt', c.version, get_solr_init_changes())
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/82cb5c69/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')):
[10/14] lucene-solr:branch_5x: When there are unpushed commits,
print out the full command used to show the commits
Posted by sa...@apache.org.
When there are unpushed commits, print out the full command used to show the commits
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7d16af9b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7d16af9b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7d16af9b
Branch: refs/heads/branch_5x
Commit: 7d16af9b645ad12925b86beca74727ccaa909541
Parents: bfab787
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:47:06 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:04:09 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7d16af9b/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 07ac6d4..12fb799 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -62,9 +62,10 @@ def getGitRev():
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
- unpushedCommits = os.popen('git log origin/%s..' % branch).read().strip()
+ command = 'git log origin/%s..' % branch
+ unpushedCommits = os.popen(command).read().strip()
if len(unpushedCommits) > 0:
- raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)
+ raise RuntimeError('There are unpushed commits - "%s" output is:\n\n%s' % (command, unpushedCommits))
print(' git clone is clean')
return os.popen('git rev-parse HEAD').read().strip()
[05/14] lucene-solr:branch_5x: replace svn up with git pull in
buildAndPushRelease.py
Posted by sa...@apache.org.
replace svn up with git pull in buildAndPushRelease.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/ddc4fc54
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ddc4fc54
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ddc4fc54
Branch: refs/heads/branch_5x
Commit: ddc4fc54e7072771437b859fccceefdd38b451db
Parents: 82cb5c6
Author: nknize <nk...@apache.org>
Authored: Thu Mar 31 13:40:04 2016 -0500
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:02:49 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ddc4fc54/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 8a6d6ba..47a986d 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -73,8 +73,8 @@ def prepare(root, version, gpgKeyID, gpgPassword):
os.remove(LOG)
os.chdir(root)
- print(' svn up...')
- run('svn up')
+ print(' git pull...')
+ run('git pull')
rev = getGitRev()
print(' git rev: %s' % rev)
@@ -236,7 +236,7 @@ def parse_config():
if config.rc_num <= 0:
parser.error('Release Candidate number must be a positive integer')
if not os.path.isdir(config.root):
- # TODO: add additional svn check to ensure dir is a real lucene-solr checkout
+ # TODO: add additional git check to ensure dir is a real lucene-solr checkout
parser.error('Root path is not a valid lucene-solr checkout')
config.version = read_version(config.root)
[06/14] lucene-solr:branch_5x: - Fail if there are unpushed commits
in the Git working tree - Drop obsolete "--push-remote" param - Drop obsolete
"--smoke-test" param - Update example RM cmdline usage - Support relative
working tree root directory - Conv
Posted by sa...@apache.org.
- Fail if there are unpushed commits in the Git working tree
- Drop obsolete "--push-remote" param
- Drop obsolete "--smoke-test" param
- Update example RM cmdline usage
- Support relative working tree root directory
- Convert "root" positional cmdline arg into an optional "--root" arg defaulting to '.'
- Use sys.executable instead of $PYTHON_EXEC when printing smoke tester cmdline
- Add new fail-fast checks:
- Check for a functional "git" executable
- Ensure "ant" version is 1.8.X
- Ensure working tree is under Git control, and contains 'lucene/', 'solr/' and 'dev-tools/' dirs
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/42753128
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/42753128
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/42753128
Branch: refs/heads/branch_5x
Commit: 427531286fe5e731ce6f7335faf5606e2391f1b0
Parents: ddc4fc5
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 15:28:06 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:03:01 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 85 ++++++++-------------------
1 file changed, 26 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/42753128/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 47a986d..8da13d3 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -61,8 +61,10 @@ def getGitRev():
status = os.popen('git status').read().strip()
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
+ unpushedCommits = os.popen('git log origin..').read().strip()
+ if len(unpushedCommits) > 0:
+ raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)
- # TODO: we should also detect unpushed changes here? Something like "git cherry -v origin/branch_5_5"?
print(' git clone is clean')
return os.popen('git rev-parse HEAD').read().strip()
@@ -115,47 +117,6 @@ def prepare(root, version, gpgKeyID, gpgPassword):
print()
return rev
-def push(version, root, rev, rcNum, username):
- print('Push...')
- dir = 'lucene-solr-%s-RC%d-rev%s' % (version, rcNum, rev)
- s = os.popen('ssh %s@people.apache.org "ls -ld public_html/staging_area/%s" 2>&1' % (username, dir)).read()
- if 'no such file or directory' not in s.lower():
- print(' Remove old dir...')
- run('ssh %s@people.apache.org "chmod -R u+rwX public_html/staging_area/%s; rm -rf public_html/staging_area/%s"' %
- (username, dir, dir))
- run('ssh %s@people.apache.org "mkdir -p public_html/staging_area/%s/lucene public_html/staging_area/%s/solr"' % \
- (username, dir, dir))
- print(' Lucene')
- os.chdir('%s/lucene/dist' % root)
- print(' zip...')
- if os.path.exists('lucene.tar.bz2'):
- os.remove('lucene.tar.bz2')
- run('tar cjf lucene.tar.bz2 *')
- print(' copy...')
- run('scp lucene.tar.bz2 %s@people.apache.org:public_html/staging_area/%s/lucene' % (username, dir))
- print(' unzip...')
- run('ssh %s@people.apache.org "cd public_html/staging_area/%s/lucene; tar xjf lucene.tar.bz2; rm -f lucene.tar.bz2"' % (username, dir))
- os.remove('lucene.tar.bz2')
-
- print(' Solr')
- os.chdir('%s/solr/package' % root)
- print(' zip...')
- if os.path.exists('solr.tar.bz2'):
- os.remove('solr.tar.bz2')
- run('tar cjf solr.tar.bz2 *')
- print(' copy...')
- run('scp solr.tar.bz2 %s@people.apache.org:public_html/staging_area/%s/solr' % (username, dir))
- print(' unzip...')
- run('ssh %s@people.apache.org "cd public_html/staging_area/%s/solr; tar xjf solr.tar.bz2; rm -f solr.tar.bz2"' % (username, dir))
- os.remove('solr.tar.bz2')
-
- print(' chmod...')
- run('ssh %s@people.apache.org "chmod -R a+rX-w public_html/staging_area/%s"' % (username, dir))
-
- print(' done!')
- url = 'http://people.apache.org/~%s/staging_area/%s' % (username, dir)
- return url
-
def pushLocal(version, root, rev, rcNum, localDir):
print('Push local [%s]...' % localDir)
os.makedirs(localDir)
@@ -206,29 +167,23 @@ def read_version(path):
def parse_config():
epilogue = textwrap.dedent('''
Example usage for a Release Manager:
- python3.2 -u buildAndPushRelease.py --push-remote mikemccand --sign 6E68DA61 --rc-num 1 /path/to/lucene_solr_4_7
+ python3 -u dev-tools/scripts/buildAndPushRelease.py --push-local /tmp/releases/6.0.1 --sign 6E68DA61 --rc-num 1
''')
description = 'Utility to build, push, and test a release.'
parser = argparse.ArgumentParser(description=description, epilog=epilogue,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--no-prepare', dest='prepare', default=True, action='store_false',
help='Use the already built release in the provided checkout')
- parser.add_argument('--push-remote', metavar='USERNAME',
- help='Push the release to people.apache.org for the given user')
parser.add_argument('--push-local', metavar='PATH',
help='Push the release to the local path')
parser.add_argument('--sign', metavar='KEYID',
help='Sign the release with the given gpg key')
parser.add_argument('--rc-num', metavar='NUM', type=int, default=1,
help='Release Candidate number, required')
- parser.add_argument('--smoke-test', metavar='PATH',
- help='Run the smoker tester on the release in the given directory')
- parser.add_argument('root', metavar='checkout_path',
- help='Root of SVN checkout for lucene-solr')
+ parser.add_argument('--root', metavar='WORKING_TREE_PATH', default='.',
+ help='Root of Git working tree for lucene-solr')
config = parser.parse_args()
- if config.push_remote is not None and config.push_local is not None:
- parser.error('Cannot specify --push-remote and --push-local together')
if not config.prepare and config.sign:
parser.error('Cannot sign already built release')
if config.push_local is not None and os.path.exists(config.push_local):
@@ -236,8 +191,13 @@ def parse_config():
if config.rc_num <= 0:
parser.error('Release Candidate number must be a positive integer')
if not os.path.isdir(config.root):
- # TODO: add additional git check to ensure dir is a real lucene-solr checkout
- parser.error('Root path is not a valid lucene-solr checkout')
+ parser.error('Root path "%s" is not a directory' % config.root)
+ cwd = os.getcwd()
+ os.chdir(config.root)
+ config.root = os.getcwd() # Absolutize root dir
+ if os.system('git rev-parse') or 3 != len([d for d in ('dev-tools','lucene','solr') if os.isdir(d)]):
+ parser.error('Root path "%s" is not a valid lucene-solr checkout' % config.root)
+ os.chdir(cwd)
config.version = read_version(config.root)
print('Building version: %s' % config.version)
@@ -251,8 +211,17 @@ def parse_config():
config.gpg_password = None
return config
+
+def check_cmdline_tools(): # Fail fast if there are cmdline tool problems
+ if os.system('git --version'):
+ raise RuntimeError('"git --version" returned a non-zero exit code.')
+ antVersion = os.popen('ant -version').read().strip()
+ if not antVersion.startswith('Apache Ant(TM) version 1.8'):
+ raise RuntimeError('ant version is not 1.8.X: "%s"' % antVersion)
def main():
+ check_cmdline_tools()
+
c = parse_config()
if c.prepare:
@@ -261,19 +230,17 @@ def main():
os.chdir(root)
rev = open('rev.txt', encoding='UTF-8').read()
- if c.push_remote:
- url = push(c.version, c.root, rev, c.rc_num, c.push_remote)
- elif c.push_local:
+ if c.push_local:
url = pushLocal(c.version, c.root, rev, c.rc_num, c.push_local)
else:
url = None
if url is not None:
print(' URL: %s' % url)
- print('Next set the PYTHON_EXEC env var and you can run the smoker tester:')
- p = re.compile("(.*)\/")
+ print('Next run the smoker tester:')
+ p = re.compile(".*/")
m = p.match(sys.argv[0])
- print(' $PYTHON_EXEC %ssmokeTestRelease.py %s' % (m.group(), url))
+ print('%s -u %(s)smokeTestRelease.py %s' % (sys.executable, m.group(), url))
if __name__ == '__main__':
try:
[14/14] lucene-solr:branch_5x: - Modernize example usage - Fail if
script version is incompatible with release version
Posted by sa...@apache.org.
- Modernize example usage
- Fail if script version is incompatible with release version
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/75975019
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/75975019
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/75975019
Branch: refs/heads/branch_5x
Commit: 75975019ba62199c5ef7fcedf771a4a74c32b443
Parents: 530f261
Author: Steve Rowe <sa...@apache.org>
Authored: Wed May 25 16:09:22 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:04:52 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/smokeTestRelease.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75975019/dev-tools/scripts/smokeTestRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index 8288a9d..3316583 100644
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -1227,7 +1227,7 @@ revision_re = re.compile(r'rev([a-f\d]+)')
def parse_config():
epilogue = textwrap.dedent('''
Example usage:
- python3.2 -u dev-tools/scripts/smokeTestRelease.py http://people.apache.org/~whoever/staging_area/lucene-solr-4.3.0-RC1-rev1469340
+ python3 -u dev-tools/scripts/smokeTestRelease.py https://dist.apache.org/repos/dist/dev/lucene/lucene-solr-6.0.1-RC2-revc7510a0...
''')
description = 'Utility to test a release.'
parser = argparse.ArgumentParser(description=description, epilog=epilogue,
@@ -1381,8 +1381,25 @@ def confirmAllReleasesAreTestedForBackCompat(smokeVersion, unpackPath):
else:
print(' success!')
+def getScriptVersion():
+ topLevelDir = '../..' # Assumption: this script is in dev-tools/scripts/ of a checkout
+ m = re.compile(r'(.*)/').match(sys.argv[0]) # Get this script's directory
+ if m is not None and m.group(1) != '.':
+ origCwd = os.getcwd()
+ os.chdir(m.group(1))
+ os.chdir('../..')
+ topLevelDir = os.getcwd()
+ os.chdir(origCwd)
+ reBaseVersion = re.compile(r'version\.base\s*=\s*(\d+\.\d+)')
+ return reBaseVersion.search(open('%s/lucene/version.properties' % topLevelDir).read()).group(1)
+
def main():
c = parse_config()
+
+ scriptVersion = getScriptVersion()
+ if not c.version.startswith(scriptVersion + '.'):
+ raise RuntimeError('smokeTestRelease.py for %s.X is incompatible with a %s release.' % (scriptVersion, c.version))
+
print('NOTE: output encoding is %s' % sys.stdout.encoding)
smokeTest(c.java, c.url, c.revision, c.version, c.tmp_dir, c.is_signed, ' '.join(c.test_args))
[12/14] lucene-solr:branch_5x: Hide 'git --version' output
Posted by sa...@apache.org.
Hide 'git --version' output
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/99ead9b5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/99ead9b5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/99ead9b5
Branch: refs/heads/branch_5x
Commit: 99ead9b5658181dbb72d8481fd80b9a260967321
Parents: fc136a4
Author: Steve Rowe <sa...@apache.org>
Authored: Mon May 23 16:28:35 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 21 00:04:28 2016 -0400
----------------------------------------------------------------------
dev-tools/scripts/buildAndPushRelease.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/99ead9b5/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 1bf0854..199a494 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -215,7 +215,7 @@ def parse_config():
return config
def check_cmdline_tools(): # Fail fast if there are cmdline tool problems
- if os.system('git --version'):
+ if os.system('git --version >/dev/null 2>/dev/null'):
raise RuntimeError('"git --version" returned a non-zero exit code.')
antVersion = os.popen('ant -version').read().strip()
if not antVersion.startswith('Apache Ant(TM) version 1.8'):