Author: dsahlberg
Date: Sat Oct 12 14:03:50 2024
New Revision: 1921278
URL: http://svn.apache.org/viewvc?rev=1921278&view=rev
Log:
Fix release.py --dry-run create-release-branch
* tools/dist/release.py
(buildbot_repos): Update path to buildbot config repo after the switch to BB2
(create_status_file_on_branch): When running --dry-run, a new branch will not
be created by make_release_branch, so checking it out will fail. Pass the
dry_run option to checkout to prevent checking out the non-existing branch.
print() the content that would go into STATUS to stdout instead.
(update_buildbot_config): The config file name was changed in the BB2
migration. Some space added around MINOR_VER, see r1077217 in the infra
repository.
Modified:
subversion/trunk/tools/dist/release.py
Modified: subversion/trunk/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1921278&r1=1921277&r2=1921278&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Sat Oct 12 14:03:50 2024
@@ -97,7 +97,7 @@ dist_dev_url = dist_repos + '/dev/subver
dist_release_url = dist_repos + '/release/subversion'
dist_archive_url = 'https://archive.apache.org/dist/subversion'
buildbot_repos = os.getenv('SVN_RELEASE_BUILDBOT_REPOS',
-
'https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster')
+
'https://svn.apache.org/repos/infra/infrastructure/buildbot2')
extns = ['zip', 'tar.gz', 'tar.bz2']
@@ -630,7 +630,8 @@ def create_status_file_on_branch(args):
ver = args.version
branch_wc = get_workdir(args.base_dir)
branch_url = get_branch_url(ver)
- run_svn(['checkout', branch_url, branch_wc, '--depth=immediates'])
+ run_svn(['checkout', branch_url, branch_wc, '--depth=immediates'],
+ dry_run=args.dry_run)
status_local_path = os.path.join(branch_wc, 'STATUS')
template_filename = 'STATUS.ezt'
@@ -641,9 +642,14 @@ def create_status_file_on_branch(args):
template = ezt.Template(compress_whitespace=False)
template.parse(get_tmplfile(template_filename).read())
- with open(status_local_path, 'wx') as g:
+ if args.dry_run:
+ print('\nNew STATUS file:')
+ print(template.generate(sys.stdout, data))
+ else:
+ with open(status_local_path, 'wx') as g:
template.generate(g, data)
- run_svn(['add', status_local_path])
+ run_svn(['add', status_local_path],
+ dry_run=args.dry_run)
run_svn(['commit', status_local_path,
'-m', '* branches/' + ver.branch + '.x/STATUS: New file.'],
dry_run=args.dry_run)
@@ -675,9 +681,9 @@ def update_buildbot_config(args):
prev_ver = Version('1.%d.0' % (ver.minor - 1,))
next_ver = Version('1.%d.0' % (ver.minor + 1,))
- relpath = 'master1/projects/subversion.conf'
+ relpath = 'projects/subversion.py'
edit_file(get_buildbot_wc_path(args.base_dir, relpath),
- r'(MINOR_LINES=\[.*%s)(\])' % (prev_ver.minor,),
+ r'(MINOR_LINES = \[.*%s)(\])' % (prev_ver.minor,),
r'\1, %s\2' % (ver.minor,))
log_msg = '''\