#!/usr/bin/env bash
#===-- merge-request.sh ---------------------------------------------------===#
#
# 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
#
#===------------------------------------------------------------------------===#
#
# Submit a merge request to bugzilla.
#
#===------------------------------------------------------------------------===#
dryrun=""
stable_version=""
revisions=""
BUGZILLA_BIN=""
BUGZILLA_CMD=""
release_metabug=""
bugzilla_product="new-bugs"
bugzilla_component="new bugs"
bugzilla_assigned_to=""
bugzilla_user=""
bugzilla_version=""
bugzilla_url="https://bugs.llvm.org/xmlrpc.cgi"
while [; do
case in
-user)
bugzilla_user=""
;;
-stable-version)
stable_version=""
;;
-r)
revisions=" "
;;
-project)
project=""
;;
-component)
bugzilla_component=""
;;
-bugzilla-bin)
BUGZILLA_BIN=""
;;
-assign-to)
bugzilla_assigned_to="--assigned_to="
;;
-dry-run)
dryrun="echo"
;;
-help | --help | -h | --h | -\? )
;;
* )
;;
esac
done
if [; then
fi
case in
4.0)
release_metabug="32061"
;;
5.0)
release_metabug="34492"
;;
6.0)
release_metabug="36649"
;;
7.0)
release_metabug="39106"
;;
8.0)
release_metabug="41221"
;;
9.0)
release_metabug="43360"
;;
*)
esac
bugzilla_version=
if [; then
fi
if [; then
fi
if [; then
BUGZILLA_BIN=
if [; then
fi
fi
BUGZILLA_MAJOR_VERSION=
if [; then
fi
BUGZILLA_CMD=" --bugzilla="
rev_string=""
for; do
rev_string=" r"
done
check_duplicates=
if [; then
fi
# Get short commit summary. To avoid having a huge summary, we just
# use the commit message for the first commit.
commit_summary=''
for; do
commit_msg=
if [; then
commit_msg=""
fi
break
done
if [; then
commit_summary=
commit_summary=" : "
fi
bug_summary="Merge into the branch"
# Login to bugzilla
bug_id=
if [; then
fi
if [; then
fi
# Add links to revisions
for; do
done