Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: tools/merge-to-branch.sh

Issue 9844015: Allow a commit message to be specified to merge-to-branch.sh (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle persisting empty variables correctly Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tools/common-includes.sh ('K') | « tools/common-includes.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/merge-to-branch.sh
diff --git a/tools/merge-to-branch.sh b/tools/merge-to-branch.sh
index 85b64d794920ad020488d0bb839b17466364c455..aa590a313ca096311e1d1b81c3b51087895e28ea 100755
--- a/tools/merge-to-branch.sh
+++ b/tools/merge-to-branch.sh
@@ -49,6 +49,7 @@ OPTIONS:
-h Show this message
-s Specify the step where to start work. Default: 0.
-p Specify a patch file to apply as part of the merge
+ -m Specify a commit message for the patch
-r Reverse specified patches
EOF
}
@@ -69,7 +70,7 @@ restore_patch_commit_hashes_if_unset() {
########## Option parsing
-while getopts ":hs:fp:r" OPTION ; do
+while getopts ":hs:fp:rm:" OPTION ; do
case $OPTION in
h) usage
exit 0
@@ -80,6 +81,8 @@ while getopts ":hs:fp:r" OPTION ; do
;;
r) REVERSE_PATCH="--reverse"
;;
+ m) NEW_COMMIT_MSG=$OPTARG
+ ;;
s) START_STEP=$OPTARG
;;
?) echo "Illegal option: -$OPTARG"
@@ -101,8 +104,13 @@ touch "$ALREADY_MERGING_SENTINEL_FILE"
initial_environment_checks
if [ $START_STEP -le $CURRENT_STEP ] ; then
- if [ ${#@} -lt 2 ] && [ -z "$EXTRA_PATCH" ] ; then
- die "Either a patch file or revision numbers must be specified"
+ if [ ${#@} -lt 2 ] ; then
+ if [ -z "$EXTRA_PATCH" ] ; then
+ die "Either a patch file or revision numbers must be specified"
+ fi
+ if [ -z "$NEW_COMMIT_MSG" ] ; then
+ die "You must specify a merge comment if no patches are specified"
+ fi
fi
echo ">>> Step $CURRENT_STEP: Preparation"
MERGE_TO_BRANCH=$1
@@ -134,9 +142,7 @@ revisions associated with the patches."
REVISION_LIST="$REVISION_LIST r$REVISION"
let current+=1
done
- if [ -z "$REVISION_LIST" ] ; then
- NEW_COMMIT_MSG="Applied patch to $MERGE_TO_BRANCH branch."
- else
+ if [ -n "$REVISION_LIST" ] ; then
if [ -n "$REVERSE_PATCH" ] ; then
NEW_COMMIT_MSG="Rollback of$REVISION_LIST in $MERGE_TO_BRANCH branch."
else
« tools/common-includes.sh ('K') | « tools/common-includes.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698