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

Unified Diff: tools/common-includes.sh

Issue 9701102: Fix bugs in tools/merge-to-branch.sh (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/common-includes.sh
diff --git a/tools/common-includes.sh b/tools/common-includes.sh
index 98206899f4a265b223fece90e8b9eca759f47e43..d14c44b7ca736883ac61d166230125eec5fe6700 100644
--- a/tools/common-includes.sh
+++ b/tools/common-includes.sh
@@ -36,6 +36,7 @@ TEMP_BRANCH=$BRANCHNAME-temporary-branch-created-by-script
VERSION_FILE="src/version.cc"
CHANGELOG_ENTRY_FILE="$PERSISTFILE_BASENAME-changelog-entry"
PATCH_FILE="$PERSISTFILE_BASENAME-patch"
+PATCH_OUTPUT_FILE="$PERSISTFILE_BASENAME-patch-output"
COMMITMSG_FILE="$PERSISTFILE_BASENAME-commitmsg"
TOUCHED_FILES_FILE="$PERSISTFILE_BASENAME-touched-files"
TRUNK_REVISION_FILE="$PERSISTFILE_BASENAME-trunkrevision"
@@ -59,7 +60,7 @@ confirm() {
}
delete_branch() {
- local MATCH=$(git branch | grep $1 | awk '{print $NF}' )
+ local MATCH=$(git branch | grep "$1" | awk '{print $NF}' | grep -x $1)
Jakob Kummerow 2012/03/16 16:01:11 You don't need the quotes around "$1", but I guess
if [ "$MATCH" == "$1" ] ; then
confirm "Branch $1 exists, do you want to delete it?"
if [ $? -eq 0 ] ; then
@@ -174,8 +175,10 @@ the uploaded CL."
# Takes a file containing the patch to apply as first argument.
apply_patch() {
- patch -p1 < "$1" | tee >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE")
- [[ $? -eq 0 ]] || die "Applying the patch failed."
+ patch -p1 < "$1" > "$PATCH_OUTPUT_FILE" || \
+ cat "$PATCH_OUTPUT_FILE" && die "Applying the patch failed."
+ tee < "$PATCH_OUTPUT_FILE" >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE")
+ rm "$PATCH_OUTPUT_FILE"
}
stage_files() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698