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

Side by Side Diff: tools/common-includes.sh

Issue 10073010: Small improvements to push-to-trunk.sh and merge-to-branch.sh. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/push-to-trunk.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 [[ -n "$ANSWER" ]] && echo "That was not 'LGTM'." 177 [[ -n "$ANSWER" ]] && echo "That was not 'LGTM'."
178 echo -n "> " 178 echo -n "> "
179 read ANSWER 179 read ANSWER
180 done 180 done
181 } 181 }
182 182
183 # Takes a file containing the patch to apply as first argument. 183 # Takes a file containing the patch to apply as first argument.
184 apply_patch() { 184 apply_patch() {
185 patch $REVERSE_PATCH -p1 < "$1" > "$PATCH_OUTPUT_FILE" || \ 185 patch $REVERSE_PATCH -p1 < "$1" > "$PATCH_OUTPUT_FILE" || \
186 { cat "$PATCH_OUTPUT_FILE" && die "Applying the patch failed."; } 186 { cat "$PATCH_OUTPUT_FILE" && die "Applying the patch failed."; }
187 tee < "$PATCH_OUTPUT_FILE" >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE") 187 tee < "$PATCH_OUTPUT_FILE" >(grep "patching file" \
188 | awk '{print $NF}' >> "$TOUCHED_FILES_FILE")
188 rm "$PATCH_OUTPUT_FILE" 189 rm "$PATCH_OUTPUT_FILE"
189 } 190 }
190 191
191 stage_files() { 192 stage_files() {
192 # Stage added and modified files. 193 # Stage added and modified files.
193 TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE") 194 TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE")
194 for FILE in $TOUCHED_FILES ; do 195 for FILE in $TOUCHED_FILES ; do
195 git add "$FILE" 196 git add "$FILE"
196 done 197 done
197 # Stage deleted files. 198 # Stage deleted files.
198 DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \ 199 DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \
199 | awk '{print $NF}') 200 | awk '{print $NF}')
200 for FILE in $DELETED_FILES ; do 201 for FILE in $DELETED_FILES ; do
201 git rm "$FILE" 202 git rm "$FILE"
202 done 203 done
203 rm -f "$TOUCHED_FILES_FILE" 204 rm -f "$TOUCHED_FILES_FILE"
204 } 205 }
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698