[llvm] 0ab035a - Remove old Suversion release scripts
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 00:36:03 PST 2020
Author: Hans Wennborg
Date: 2020-01-17T09:35:34+01:00
New Revision: 0ab035ae504deaba4bc24d32bc38c6bc3be58e01
URL: https://github.com/llvm/llvm-project/commit/0ab035ae504deaba4bc24d32bc38c6bc3be58e01
DIFF: https://github.com/llvm/llvm-project/commit/0ab035ae504deaba4bc24d32bc38c6bc3be58e01.diff
LOG: Remove old Suversion release scripts
Added:
Modified:
Removed:
llvm/utils/release/merge-git.sh
llvm/utils/release/merge.sh
llvm/utils/release/tag.sh
################################################################################
diff --git a/llvm/utils/release/merge-git.sh b/llvm/utils/release/merge-git.sh
deleted file mode 100755
index 33162f6c8131..000000000000
--- a/llvm/utils/release/merge-git.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-#===-- merge-git.sh - Merge commit to the stable branch --------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# This script will merge an svn revision to a git repo using git-svn while
-# preserving the svn commit message.
-#
-# NOTE: This script has only been tested with the per-project git repositories
-# and not with the monorepo.
-#
-# In order to use this script, you must:
-# 1) Checkout the stable branch you would like to merge the revision into.
-# 2) Correctly configure the branch as an svn-remote by adding the following to
-# your .git/config file for your git repo (replace xy with the major/minor
-# version of the release branch. e.g. release_50 or release_60):
-#
-#[svn-remote "release_xy"]
-#url = https://llvm.org/svn/llvm-project/llvm/branches/release_xy
-#fetch = :refs/remotes/origin/release_xy
-#
-# Once the script completes successfully, you can push your changes with
-# git-svn dcommit
-#
-#===------------------------------------------------------------------------===#
-
-
-usage() {
- echo "usage: `basename $0` [OPTIONS]"
- echo " -rev NUM The revision to merge into the project"
-}
-
-while [ $# -gt 0 ]; do
- case $1 in
- -rev | --rev | -r )
- shift
- rev=$1
- ;;
- -h | -help | --help )
- usage
- ;;
- * )
- echo "unknown option: $1"
- echo ""
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-if [ -z "$rev" ]; then
- echo "error: need to specify a revision"
- echo
- usage
- exit 1
-fi
-
-# Rebuild revision map
-git svn find-rev r$rev origin/master &>/dev/null
-
-git_hash=`git svn find-rev r$rev origin/master`
-
-if [ -z "$git_hash" ]; then
- echo "error: could not determine git commit for r$rev"
- exit 1
-fi
-
-commit_msg=`svn log -r $rev https://llvm.org/svn/llvm-project/`
-ammend="--amend"
-
-git cherry-pick $git_hash
-if [ $? -ne 0 ]; then
- echo ""
- echo "** cherry-pick failed enter 'e' to exit or 'c' when you have finished resolving the conflicts:"
- read option
- case $option in
- c)
- ammend=""
- ;;
- *)
- exit 1
- ;;
- esac
-fi
-
-git commit $ammend -m "Merging r$rev:" -m "$commit_msg"
diff --git a/llvm/utils/release/merge.sh b/llvm/utils/release/merge.sh
deleted file mode 100755
index ad289b6212ce..000000000000
--- a/llvm/utils/release/merge.sh
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-#===-- merge.sh - Test the LLVM release candidates -------------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# Merge a revision into a project.
-#
-#===------------------------------------------------------------------------===#
-
-set -e
-
-rev=""
-proj=""
-revert="no"
-srcdir=""
-
-usage() {
- echo "usage: `basename $0` [OPTIONS]"
- echo " -proj PROJECT The project to merge the result into"
- echo " -rev NUM The revision to merge into the project"
- echo " -revert Revert rather than merge the commit"
- echo " -srcdir The root of the project checkout"
-}
-
-while [ $# -gt 0 ]; do
- case $1 in
- -rev | --rev | -r )
- shift
- rev=$1
- ;;
- -proj | --proj | -project | --project | -p )
- shift
- proj=$1
- ;;
- --srcdir | -srcdir | -s)
- shift
- srcdir=$1
- ;;
- -h | -help | --help )
- usage
- ;;
- -revert | --revert )
- revert="yes"
- ;;
- * )
- echo "unknown option: $1"
- echo ""
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-if [ -z "$srcdir" ]; then
- srcdir="$proj.src"
-fi
-
-if [ "x$rev" = "x" -o "x$proj" = "x" ]; then
- echo "error: need to specify project and revision"
- echo
- usage
- exit 1
-fi
-
-if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then
- echo "error: invalid project: $proj"
- exit 1
-fi
-
-tempfile=`mktemp /tmp/merge.XXXXXX` || exit 1
-
-if [ $revert = "yes" ]; then
- echo "Reverting r$rev:" > $tempfile
-else
- echo "Merging r$rev:" > $tempfile
-fi
-svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1
-
-cd "$srcdir"
-echo "# Updating tree"
-svn up
-
-if [ $revert = "yes" ]; then
- echo "# Reverting r$rev in $proj locally"
- svn merge -c -$rev . || exit 1
-else
- echo "# Merging r$rev into $proj locally"
- svn merge -c $rev https://llvm.org/svn/llvm-project/$proj/trunk . || exit 1
-fi
-
-echo
-echo "# To commit, run the following in $srcdir/:"
-echo svn commit -F $tempfile
-
-exit 0
diff --git a/llvm/utils/release/tag.sh b/llvm/utils/release/tag.sh
deleted file mode 100755
index 01922f405ea1..000000000000
--- a/llvm/utils/release/tag.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/bash
-#===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# Create branches and release candidates for the LLVM release.
-#
-#===------------------------------------------------------------------------===#
-
-set -e
-
-release=""
-rc=""
-rebranch="no"
-# All the projects that make it into the monorepo, plus test-suite.
-projects="monorepo-root cfe clang-tools-extra compiler-rt debuginfo-tests libclc libcxx libcxxabi libunwind lld lldb llgo llvm openmp parallel-libs polly pstl test-suite"
-dryrun=""
-revision="HEAD"
-
-base_url="https://llvm.org/svn/llvm-project"
-
-usage() {
- echo "usage: `basename $0` -release <num> [-rebranch] [-revision <num>] [-dry-run]"
- echo "usage: `basename $0` -release <num> -rc <num> [-dry-run]"
- echo " "
- echo " -release <num> The version number of the release"
- echo " -rc <num> The release candidate number"
- echo " -rebranch Remove existing branch, if present, before branching"
- echo " -final Tag final release candidate"
- echo " -revision <num> Revision to branch off (default: HEAD)"
- echo " -dry-run Make no changes to the repository, just print the commands"
-}
-
-tag_version() {
- local remove_args=()
- local create_args=()
- local message_prefix
- set -x
- for proj in $projects; do
- if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then
- if [ $rebranch = "no" ]; then
- continue
- fi
- remove_args+=(rm "$proj/branches/release_$branch_release")
- fi
- create_args+=(cp ${revision} "$proj/trunk" "$proj/branches/release_$branch_release")
- done
- if [[ ${#remove_args[@]} -gt 0 ]]; then
- message_prefix="Removing and recreating"
- else
- message_prefix="Creating"
- fi
- if [[ ${#create_args[@]} -gt 0 ]]; then
- ${dryrun} svnmucc --root-url "$base_url" \
- -m "$message_prefix release_$branch_release branch off revision ${revision}" \
- "${remove_args[@]}" "${create_args[@]}"
- fi
- set +x
-}
-
-tag_release_candidate() {
- local create_args=()
- set -x
- for proj in $projects ; do
- if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
- create_args+=(mkdir "$proj/tags/RELEASE_$tag_release")
- fi
- if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
- create_args+=(cp HEAD
- "$proj/branches/release_$branch_release"
- "$proj/tags/RELEASE_$tag_release/$rc")
- fi
- done
- if [[ ${#create_args[@]} -gt 0 ]]; then
- ${dryrun} svnmucc --root-url "$base_url" \
- -m "Creating release candidate $rc from release_$tag_release branch" \
- "${create_args[@]}"
- fi
- set +x
-}
-
-while [ $# -gt 0 ]; do
- case $1 in
- -release | --release )
- shift
- release=$1
- ;;
- -rc | --rc )
- shift
- rc="rc$1"
- ;;
- -rebranch | --rebranch )
- rebranch="yes"
- ;;
- -final | --final )
- rc="final"
- ;;
- -revision | --revision )
- shift
- revision="$1"
- ;;
- -dry-run | --dry-run )
- dryrun="echo"
- ;;
- -h | --help | -help )
- usage
- exit 0
- ;;
- * )
- echo "unknown option: $1"
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-if [ "$release" = "" ]; then
- echo "error: need to specify a release version"
- echo
- usage
- exit 1
-fi
-
-branch_release=`echo $release | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,' | sed -e 's,\.,,g'`
-tag_release=`echo $release | sed -e 's,\.,,g'`
-
-if [ "$rc" = "" ]; then
- tag_version
-else
- if [ "$revision" != "HEAD" ]; then
- echo "error: cannot use -revision with -rc"
- echo
- usage
- exit 1
- fi
-
- tag_release_candidate
-fi
-
-exit 0
More information about the llvm-commits
mailing list