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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 let CURRENT_STEP+=1 | 132 let CURRENT_STEP+=1 |
| 133 if [ $START_STEP -le $CURRENT_STEP ] ; then | 133 if [ $START_STEP -le $CURRENT_STEP ] ; then |
| 134 echo ">>> Step $CURRENT_STEP: Create a fresh branch for the patch." | 134 echo ">>> Step $CURRENT_STEP: Create a fresh branch for the patch." |
| 135 restore_if_unset "MERGE_TO_BRANCH" | 135 restore_if_unset "MERGE_TO_BRANCH" |
| 136 git checkout -b $BRANCHNAME svn/$MERGE_TO_BRANCH \ | 136 git checkout -b $BRANCHNAME svn/$MERGE_TO_BRANCH \ |
| 137 || die "Creating branch $BRANCHNAME failed." | 137 || die "Creating branch $BRANCHNAME failed." |
| 138 fi | 138 fi |
| 139 | 139 |
| 140 let CURRENT_STEP+=1 | 140 let CURRENT_STEP+=1 |
| 141 if [ $START_STEP -le $CURRENT_STEP ] ; then | 141 if [ $START_STEP -le $CURRENT_STEP ] ; then |
| 142 echo ">>> Step $CURRENT_STEP: Search for corresponding MIPS ports." | |
| 143 for REVISION in "$@" ; do | |
| 144 MIPS_GIT_HASH=$(git log svn/bleeding_edge -1 --format=%H --grep="Port r$REVI SION") | |
|
Michael Achenbach
2014/02/05 11:10:52
Can svn/bleeding_edge be left out here?
Jakob Kummerow
2014/02/05 12:04:13
Definitely not. "git checkout -b" above branches f
| |
| 145 if [ "$MIPS_GIT_HASH" != "" ] ; then | |
|
Michael Achenbach
2014/02/05 11:10:52
I'm not a bash expert. Is this equivalent? Then pr
Jakob Kummerow
2014/02/05 12:04:13
+1. AFAIK Bash doesn't handle empty strings very w
palfia
2014/02/05 17:42:05
Done.
| |
| 146 MIPS_SVN_REVISION=$(git svn find-rev $MIPS_GIT_HASH svn/bleeding_edge) | |
| 147 if [ $? -eq 0 ] ; then | |
| 148 FULL_REVISION_LIST=("${FULL_REVISION_LIST[@]}" "$REVISION" "$MIPS_SVN_RE VISION") | |
|
Michael Achenbach
2014/02/05 11:10:52
What is with revisions where no MIPS port exists,
palfia
2014/02/05 17:42:05
Auch. Thanks for pointing this out! Done.
| |
| 149 MIPS_REVISION_TITLE=$(git log -1 --format=%s $MIPS_GIT_HASH) | |
| 150 # Is this revision included in the original revision list? | |
| 151 if [[ $@ =~ (^| )$MIPS_SVN_REVISION($| ) ]] ; then | |
| 152 echo "Found MIPS port of r$REVISION -> \ | |
| 153 r$MIPS_SVN_REVISION (already included): $MIPS_REVISION_TITLE" | |
| 154 else | |
| 155 echo "Found MIPS port of r$REVISION -> \ | |
| 156 r$MIPS_SVN_REVISION: $MIPS_REVISION_TITLE" | |
| 157 MIPS_REVISION_LIST=("${MIPS_REVISION_LIST[@]}" "$MIPS_SVN_REVISION") | |
| 158 fi | |
| 159 fi | |
| 160 fi | |
| 161 done | |
| 162 # Next step expects a list, not an array. | |
| 163 FULL_REVISION_LIST="${FULL_REVISION_LIST[@]}" | |
| 164 # Do we find any MIPS port? | |
| 165 if [ ${#MIPS_REVISION_LIST[@]} -ne 0 ] ; then | |
| 166 confirm "Automatically add corresponding MIPS ports (${MIPS_REVISION_LIST[@] })?" | |
| 167 #: 'n': Restore the original revision list. | |
| 168 if [ $? -ne 0 ] ; then | |
| 169 FULL_REVISION_LIST="$@" | |
| 170 fi | |
| 171 fi | |
| 172 fi | |
| 173 | |
| 174 let CURRENT_STEP+=1 | |
| 175 if [ $START_STEP -le $CURRENT_STEP ] ; then | |
| 142 echo ">>> Step $CURRENT_STEP: Find the git \ | 176 echo ">>> Step $CURRENT_STEP: Find the git \ |
| 143 revisions associated with the patches." | 177 revisions associated with the patches." |
| 144 current=0 | 178 current=0 |
| 145 for REVISION in "$@" ; do | 179 for REVISION in $FULL_REVISION_LIST ; do |
|
Michael Achenbach
2014/02/05 11:10:52
All state that needs to be transferred from one st
palfia
2014/02/05 17:42:05
Done.
| |
| 146 NEXT_HASH=$(git svn find-rev "r$REVISION" svn/bleeding_edge) | 180 NEXT_HASH=$(git svn find-rev "r$REVISION" svn/bleeding_edge) |
| 147 [[ -n "$NEXT_HASH" ]] \ | 181 [[ -n "$NEXT_HASH" ]] \ |
| 148 || die "Cannot determine git hash for r$REVISION" | 182 || die "Cannot determine git hash for r$REVISION" |
| 149 PATCH_COMMIT_HASHES[$current]="$NEXT_HASH" | 183 PATCH_COMMIT_HASHES[$current]="$NEXT_HASH" |
| 150 [[ -n "$REVISION_LIST" ]] && REVISION_LIST="$REVISION_LIST," | 184 [[ -n "$REVISION_LIST" ]] && REVISION_LIST="$REVISION_LIST," |
| 151 REVISION_LIST="$REVISION_LIST r$REVISION" | 185 REVISION_LIST="$REVISION_LIST r$REVISION" |
| 152 let current+=1 | 186 let current+=1 |
| 153 done | 187 done |
| 154 if [ -n "$REVISION_LIST" ] ; then | 188 if [ -n "$REVISION_LIST" ] ; then |
| 155 if [ -n "$REVERSE_PATCH" ] ; then | 189 if [ -n "$REVERSE_PATCH" ] ; then |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 restore_version_if_unset "NEW" | 324 restore_version_if_unset "NEW" |
| 291 common_cleanup | 325 common_cleanup |
| 292 if [ $REVERT_FROM_BLEEDING_EDGE==0 ] ; then | 326 if [ $REVERT_FROM_BLEEDING_EDGE==0 ] ; then |
| 293 echo "*** SUMMARY ***" | 327 echo "*** SUMMARY ***" |
| 294 echo "version: $NEWMAJOR.$NEWMINOR.$NEWBUILD.$NEWPATCH" | 328 echo "version: $NEWMAJOR.$NEWMINOR.$NEWBUILD.$NEWPATCH" |
| 295 echo "branch: $TO_URL" | 329 echo "branch: $TO_URL" |
| 296 echo "svn revision: $SVN_REVISION" | 330 echo "svn revision: $SVN_REVISION" |
| 297 [[ -n "$REVISION_LIST" ]] && echo "patches:$REVISION_LIST" | 331 [[ -n "$REVISION_LIST" ]] && echo "patches:$REVISION_LIST" |
| 298 fi | 332 fi |
| 299 fi | 333 fi |
| OLD | NEW |