diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-12-05 16:29:01 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-12-05 16:29:01 -0800 |
commit | 21d081fd7f83aa168ea0bef0870c7f1fed410a63 (patch) | |
tree | 23a04eef49364b1cbee204a87fd0904be2430c2e /deps/v8/tools/push-to-trunk.sh | |
parent | e90623edc2befb06602ff8c3e01809ba0a21d593 (diff) | |
download | node-new-21d081fd7f83aa168ea0bef0870c7f1fed410a63.tar.gz |
Upgrade V8 to 3.7.12
Diffstat (limited to 'deps/v8/tools/push-to-trunk.sh')
-rwxr-xr-x | deps/v8/tools/push-to-trunk.sh | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/deps/v8/tools/push-to-trunk.sh b/deps/v8/tools/push-to-trunk.sh index 761b733679..302c5f299b 100755 --- a/deps/v8/tools/push-to-trunk.sh +++ b/deps/v8/tools/push-to-trunk.sh @@ -38,6 +38,7 @@ CHANGELOG_ENTRY_FILE="$PERSISTFILE_BASENAME-changelog-entry" PATCH_FILE="$PERSISTFILE_BASENAME-patch" COMMITMSG_FILE="$PERSISTFILE_BASENAME-commitmsg" TOUCHED_FILES_FILE="$PERSISTFILE_BASENAME-touched-files" +TRUNK_REVISION_FILE="$PERSISTFILE_BASENAME-trunkrevision" STEP=0 @@ -202,10 +203,14 @@ if [ $STEP -le 4 ] ; then for commit in $COMMITS ; do # Get the commit's title line. git log -1 $commit --format="%w(80,8,8)%s" >> "$CHANGELOG_ENTRY_FILE" - # Grep for "BUG=xxxx" lines in the commit message. - git log -1 $commit --format="%b" | grep BUG= | grep -v "BUG=$" \ - | sed -e 's/^/ /' \ - >> "$CHANGELOG_ENTRY_FILE" + # Grep for "BUG=xxxx" lines in the commit message and convert them to + # "(issue xxxx)". + git log -1 $commit --format="%B" \ + | grep "^BUG=" | grep -v "BUG=$" \ + | sed -e 's/^/ /' \ + | sed -e 's/BUG=v8:\(.*\)$/(issue \1)/' \ + | sed -e 's/BUG=\(.*\)$/(Chromium issue \1)/' \ + >> "$CHANGELOG_ENTRY_FILE" # Append the commit's author for reference. git log -1 $commit --format="%w(80,8,8)(%an)" >> "$CHANGELOG_ENTRY_FILE" echo "" >> "$CHANGELOG_ENTRY_FILE" @@ -221,7 +226,13 @@ exit your EDITOR. " $EDITOR "$CHANGELOG_ENTRY_FILE" NEWCHANGELOG=$(mktemp) # Eliminate any trailing newlines by going through a shell variable. - CHANGELOGENTRY=$(cat "$CHANGELOG_ENTRY_FILE") + # Also (1) eliminate tabs, (2) fix too little and (3) too much indentation, + # and (4) eliminate trailing whitespace. + CHANGELOGENTRY=$(cat "$CHANGELOG_ENTRY_FILE" \ + | sed -e 's/\t/ /g' \ + | sed -e 's/^ \{1,7\}\([^ ]\)/ \1/g' \ + | sed -e 's/^ \{9,80\}\([^ ]\)/ \1/g' \ + | sed -e 's/ \+$//') [[ -n "$CHANGELOGENTRY" ]] || die "Empty ChangeLog entry." echo "$CHANGELOGENTRY" > "$NEWCHANGELOG" echo "" >> "$NEWCHANGELOG" # Explicitly insert two empty lines. @@ -256,8 +267,10 @@ if [ $STEP -le 7 ] ; then restore_if_unset "NEWMAJOR" restore_if_unset "NEWMINOR" restore_if_unset "NEWBUILD" - git commit -a -m "Prepare push to trunk. \ -Now working on version $NEWMAJOR.$NEWMINOR.$NEWBUILD." \ + PREPARE_COMMIT_MSG="Prepare push to trunk. \ +Now working on version $NEWMAJOR.$NEWMINOR.$NEWBUILD." + persist "PREPARE_COMMIT_MSG" + git commit -a -m "$PREPARE_COMMIT_MSG" \ || die "'git commit -a' failed." fi @@ -272,7 +285,8 @@ fi if [ $STEP -le 9 ] ; then echo ">>> Step 9: Commit to the repository." echo "Please wait for an LGTM, then type \"LGTM<Return>\" to commit your \ -change. (If you need to iterate on the patch, do so in another shell.)" +change. (If you need to iterate on the patch, do so in another shell. Do not \ +modify the existing local commit's commit message.)" unset ANSWER while [ "$ANSWER" != "LGTM" ] ; do [[ -n "$ANSWER" ]] && echo "That was not 'LGTM'." @@ -294,15 +308,21 @@ change. (If you need to iterate on the patch, do so in another shell.)" fi if [ $STEP -le 10 ] ; then - echo ">>> Step 10: NOP" - # Present in the manual guide, not necessary (even harmful!) for this script. + echo ">>> Step 10: Fetch straggler commits that sneaked in between \ +steps 1 and 9." + git svn fetch || die "'git svn fetch' failed." + git checkout svn/bleeding_edge + restore_if_unset "PREPARE_COMMIT_MSG" + PREPARE_COMMIT_HASH=$(git log -1 --format=%H --grep="$PREPARE_COMMIT_MSG") + persist "PREPARE_COMMIT_HASH" fi if [ $STEP -le 11 ] ; then echo ">>> Step 11: Squash commits into one." # Instead of relying on "git rebase -i", we'll just create a diff, because # that's easier to automate. - git diff svn/trunk > "$PATCH_FILE" + restore_if_unset "PREPARE_COMMIT_HASH" + git diff svn/trunk $PREPARE_COMMIT_HASH > "$PATCH_FILE" # Convert the ChangeLog entry to commit message format: # - remove date # - remove indentation @@ -397,7 +417,10 @@ fi if [ $STEP -le 17 ] ; then echo ">>> Step 17. Commit to SVN." - git svn dcommit || die "'git svn dcommit' failed." + git svn dcommit | tee >(grep -E "^Committed r[0-9]+" \ + | sed -e 's/^Committed r\([0-9]\+\)/\1/' \ + > "$TRUNK_REVISION_FILE") \ + || die "'git svn dcommit' failed." fi if [ $STEP -le 18 ] ; then @@ -424,8 +447,10 @@ if [ $STEP -le 20 ] ; then restore_if_unset "MINOR" restore_if_unset "BUILD" echo "Congratulations, you have successfully created the trunk revision \ -$MAJOR.$MINOR.$BUILD. Please don't forget to update the v8rel spreadsheet, \ -and to roll this new version into Chromium." +$MAJOR.$MINOR.$BUILD. Please don't forget to roll this new version into \ +Chromium, and to update the v8rel spreadsheet:" + TRUNK_REVISION=$(cat "$TRUNK_REVISION_FILE") + echo -e "$MAJOR.$MINOR.$BUILD\ttrunk\t$TRUNK_REVISION" # Clean up all temporary files. rm -f "$PERSISTFILE_BASENAME"* fi |