[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
This commit is contained in:
Előd Illés 2025-03-03 10:47:29 +01:00 committed by Elod Illes
parent 553e09ac81
commit fee922c6a4
2 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -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