Chromium Code Reviews| Index: tools/merge-to-branch.sh |
| diff --git a/tools/merge-to-branch.sh b/tools/merge-to-branch.sh |
| index ef7cee4b38227f3e0fcd22c64750159e81db29c8..1154e56305c4de570e2a757be65679b906e3420e 100755 |
| --- a/tools/merge-to-branch.sh |
| +++ b/tools/merge-to-branch.sh |
| @@ -233,11 +233,25 @@ if [ $START_STEP -le $CURRENT_STEP ] ; then |
| restore_if_unset "MERGE_TO_BRANCH" |
| restore_patch_commit_hashes_if_unset "PATCH_COMMIT_HASHES" |
| echo "${PATCH_COMMIT_HASHES[@]}" |
| - echo ">>> Step $CURRENT_STEP: Apply the revision patch and create commit message." |
| + echo ">>> Step $CURRENT_STEP: Apply patches for selected revisions." |
| + rm -f "$TOUCHED_FILES_FILE" |
| for HASH in ${PATCH_COMMIT_HASHES[@]} ; do |
| git log -1 -p $HASH | patch -p1 \ |
| - || die "Cannot apply the patch for $HASH to $MERGE_TO_BRANCH" |
| + | tee >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE") |
| + [[ $? -eq 0 ]] || die "Applying the patch to trunk failed." |
|
Jakob Kummerow
2012/02/02 13:45:54
Your previous error message was more fitting (or u
danno
2012/02/07 22:51:37
Done.
|
| done |
| + # Stage added and modified files. |
| + TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE") |
| + for FILE in $TOUCHED_FILES ; do |
| + git add "$FILE" |
| + done |
| + # Stage deleted files. |
| + DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \ |
| + | awk '{print $NF}') |
| + for FILE in $DELETED_FILES ; do |
| + git rm "$FILE" |
| + done |
| + rm -f "$TOUCHED_FILES_FILE" |
| fi |
| let CURRENT_STEP+=1 |