From fee922c6a46209dd992f8a41fc5aa6319c012e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C5=91d=20Ill=C3=A9s?= Date: Mon, 3 Mar 2025 10:47:29 +0100 Subject: [PATCH] [tool] Add bulk_review.sh to process This patch adds bulk_review.sh script usage to process, as that can be used for some of the tasks, for example for mass stable branch cutting. This patch also refactors the script with some minor change to make it more convenient to use. Change-Id: I192d978b09e6478f57251b0ea2371748da8f646c --- doc/source/reference/process.rst | 4 ++++ tools/bulk_review.sh | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/doc/source/reference/process.rst b/doc/source/reference/process.rst index 0eb3de6324..63e9a20143 100644 --- a/doc/source/reference/process.rst +++ b/doc/source/reference/process.rst @@ -1089,6 +1089,10 @@ R-4 week Please use ``$series-stable-branches`` as gerrit topic. + After the above command created the branch cut changes, + ``tools/bulk_review.sh`` script can be used to propose them in separate + patches, grouped by teams. + - That patch will be used as a base to communicate with the team: if a team wants to wait for a specific patch to make it to the library, someone from the team can -1 the patch to have diff --git a/tools/bulk_review.sh b/tools/bulk_review.sh index 70c7e37918..a25ebd62c1 100755 --- a/tools/bulk_review.sh +++ b/tools/bulk_review.sh @@ -34,6 +34,17 @@ function usage { echo "PTLs and liaisons will be CC'd on the review" } + +# Activate venv if not yet activated as we need it for some commands +TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname $TOOLSDIR) +if [[ -z "$VIRTUAL_ENV" ]]; then + if [[ ! -d $BASEDIR/.tox/venv ]]; then + (cd $BASEDIR && tox -e venv --notest) + fi + source $BASEDIR/.tox/venv/bin/activate +fi + # NOTE: It might be worth switching getopt but I don't know if that is # available and the same on MacOS while getopts "t:s:b:" arg ; do @@ -106,8 +117,12 @@ for team in "${!files_by_team_release[@]}" ; do git checkout $branch_name git show --stat echo - echo 'Push? (Ctrl-C to cancel)' - read - git review -y -t $topic + read -p "> Push? (press N to skip) " SKIP + if [ "${SKIP,,}" == "n" ]; then + echo "Skipping." + else + git review -y -t $topic + fi + done git checkout master