Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright 2012 the V8 project authors. All rights reserved. | 2 # Copyright 2012 the V8 project authors. All rights reserved. |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 fi | 226 fi |
| 227 persist "NEW_COMMIT_MSG" | 227 persist "NEW_COMMIT_MSG" |
| 228 persist_patch_commit_hashes | 228 persist_patch_commit_hashes |
| 229 fi | 229 fi |
| 230 | 230 |
| 231 let CURRENT_STEP+=1 | 231 let CURRENT_STEP+=1 |
| 232 if [ $START_STEP -le $CURRENT_STEP ] ; then | 232 if [ $START_STEP -le $CURRENT_STEP ] ; then |
| 233 restore_if_unset "MERGE_TO_BRANCH" | 233 restore_if_unset "MERGE_TO_BRANCH" |
| 234 restore_patch_commit_hashes_if_unset "PATCH_COMMIT_HASHES" | 234 restore_patch_commit_hashes_if_unset "PATCH_COMMIT_HASHES" |
| 235 echo "${PATCH_COMMIT_HASHES[@]}" | 235 echo "${PATCH_COMMIT_HASHES[@]}" |
| 236 echo ">>> Step $CURRENT_STEP: Apply the revision patch and create commit messa ge." | 236 echo ">>> Step $CURRENT_STEP: Apply patches for selected revisions." |
| 237 rm -f "$TOUCHED_FILES_FILE" | |
| 237 for HASH in ${PATCH_COMMIT_HASHES[@]} ; do | 238 for HASH in ${PATCH_COMMIT_HASHES[@]} ; do |
| 238 git log -1 -p $HASH | patch -p1 \ | 239 git log -1 -p $HASH | patch -p1 \ |
| 239 || die "Cannot apply the patch for $HASH to $MERGE_TO_BRANCH" | 240 | tee >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE") |
| 241 [[ $? -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.
| |
| 240 done | 242 done |
| 243 # Stage added and modified files. | |
| 244 TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE") | |
| 245 for FILE in $TOUCHED_FILES ; do | |
| 246 git add "$FILE" | |
| 247 done | |
| 248 # Stage deleted files. | |
| 249 DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \ | |
| 250 | awk '{print $NF}') | |
| 251 for FILE in $DELETED_FILES ; do | |
| 252 git rm "$FILE" | |
| 253 done | |
| 254 rm -f "$TOUCHED_FILES_FILE" | |
| 241 fi | 255 fi |
| 242 | 256 |
| 243 let CURRENT_STEP+=1 | 257 let CURRENT_STEP+=1 |
| 244 if [ $START_STEP -le $CURRENT_STEP ] ; then | 258 if [ $START_STEP -le $CURRENT_STEP ] ; then |
| 245 echo ">>> Step $CURRENT_STEP: Prepare version.cc" | 259 echo ">>> Step $CURRENT_STEP: Prepare version.cc" |
| 246 # These version numbers are used again for creating the tag | 260 # These version numbers are used again for creating the tag |
| 247 PATCH=$(grep "#define PATCH_LEVEL" "$VERSION_FILE" | awk '{print $NF}') | 261 PATCH=$(grep "#define PATCH_LEVEL" "$VERSION_FILE" | awk '{print $NF}') |
| 248 persist "PATCH" | 262 persist "PATCH" |
| 249 fi | 263 fi |
| 250 | 264 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 fi | 351 fi |
| 338 | 352 |
| 339 let CURRENT_STEP+=1 | 353 let CURRENT_STEP+=1 |
| 340 if [ $START_STEP -le $CURRENT_STEP ] ; then | 354 if [ $START_STEP -le $CURRENT_STEP ] ; then |
| 341 echo ">>> Step $CURRENT_STEP: Cleanup." | 355 echo ">>> Step $CURRENT_STEP: Cleanup." |
| 342 restore_if_unset "CURRENT_BRANCH" | 356 restore_if_unset "CURRENT_BRANCH" |
| 343 git checkout -f $CURRENT_BRANCH | 357 git checkout -f $CURRENT_BRANCH |
| 344 [[ "$BRANCHNAME" != "$CURRENT_BRANCH" ]] && git branch -D $BRANCHNAME | 358 [[ "$BRANCHNAME" != "$CURRENT_BRANCH" ]] && git branch -D $BRANCHNAME |
| 345 rm -f "$ALREADY_MERGING_SENTINEL_FILE" | 359 rm -f "$ALREADY_MERGING_SENTINEL_FILE" |
| 346 fi | 360 fi |
| OLD | NEW |