From 3ad0201e3ec6e3e4a509f566383f36493d7ad902 Mon Sep 17 00:00:00 2001 From: anshum Date: Thu, 28 Apr 2016 17:33:00 -0700 Subject: [PATCH] LUCENE-7265: Fix addVersion to cherry-pick downstream changes by using the change id --- dev-tools/scripts/addVersion.py | 5 ++++- dev-tools/scripts/scriptutil.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py index ccf1a499256..6a4d68c8656 100644 --- a/dev-tools/scripts/addVersion.py +++ b/dev-tools/scripts/addVersion.py @@ -186,7 +186,10 @@ def read_config(): return c def main(): - c = read_config() + c = read_config() + + if c.changeid: + cherry_pick_change(c.changeid) print('\nAdding new version %s' % c.version) update_changes('lucene/CHANGES.txt', c.version) diff --git a/dev-tools/scripts/scriptutil.py b/dev-tools/scripts/scriptutil.py index 216bde433b7..f10bf971b6f 100644 --- a/dev-tools/scripts/scriptutil.py +++ b/dev-tools/scripts/scriptutil.py @@ -121,6 +121,11 @@ 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)