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

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

Issue 9839056: Support reverse patching in merge-to-branch.sh (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « 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 49bf3e44896cefdb3d90d79d42276e87bcb19bbd..a52b450120a011e2e982b18a9306901e5d238bfe 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
+ -r Reverse specified patches
EOF
}
@@ -68,7 +69,7 @@ restore_patch_commit_hashes_if_unset() {
########## Option parsing
-while getopts ":hs:fp:" OPTION ; do
+while getopts ":hs:fp:r" OPTION ; do
case $OPTION in
h) usage
exit 0
@@ -77,6 +78,8 @@ while getopts ":hs:fp:" OPTION ; do
;;
f) rm -f "$ALREADY_MERGING_SENTINEL_FILE"
;;
+ r) REVERSE_PATCH="--reverse"
+ ;;
s) START_STEP=$OPTARG
;;
?) echo "Illegal option: -$OPTARG"
@@ -134,7 +137,13 @@ revisions associated with the patches."
if [ -z "$REVISION_LIST" ] ; then
NEW_COMMIT_MSG="Applied patch to $MERGE_TO_BRANCH branch."
else
- NEW_COMMIT_MSG="Merged$REVISION_LIST into $MERGE_TO_BRANCH branch."
+ if [ -n "$REVERSE_PATCH" ] ; then
+ NEW_COMMIT_MSG="Rollback of$REVISION_LIST in \
+$MERGE_TO_BRANCH branch."
+ else
+ NEW_COMMIT_MSG="Merged$REVISION_LIST into \
+$MERGE_TO_BRANCH branch."
+ fi;
fi;
echo "$NEW_COMMIT_MSG" > $COMMITMSG_FILE
« no previous file with comments | « tools/common-includes.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698