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

Unified Diff: tools/merge-to-branch.sh

Issue 152343011: Add support to automatically search for corresponding architecture ports in merge-to-branch.sh. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/merge-to-branch.sh
diff --git a/tools/merge-to-branch.sh b/tools/merge-to-branch.sh
index 175567e97fed58a7fd18207300ee1e7d628feb03..7336c6fc4ed29701df84de66f5191122cd722cc5 100755
--- a/tools/merge-to-branch.sh
+++ b/tools/merge-to-branch.sh
@@ -139,10 +139,44 @@ fi
let CURRENT_STEP+=1
if [ $START_STEP -le $CURRENT_STEP ] ; then
+ echo ">>> Step $CURRENT_STEP: Search for corresponding MIPS ports."
+ for REVISION in "$@" ; do
+ MIPS_GIT_HASH=$(git log svn/bleeding_edge -1 --format=%H --grep="Port r$REVISION")
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
+ 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.
+ MIPS_SVN_REVISION=$(git svn find-rev $MIPS_GIT_HASH svn/bleeding_edge)
+ if [ $? -eq 0 ] ; then
+ FULL_REVISION_LIST=("${FULL_REVISION_LIST[@]}" "$REVISION" "$MIPS_SVN_REVISION")
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.
+ MIPS_REVISION_TITLE=$(git log -1 --format=%s $MIPS_GIT_HASH)
+ # Is this revision included in the original revision list?
+ if [[ $@ =~ (^| )$MIPS_SVN_REVISION($| ) ]] ; then
+ echo "Found MIPS port of r$REVISION -> \
+r$MIPS_SVN_REVISION (already included): $MIPS_REVISION_TITLE"
+ else
+ echo "Found MIPS port of r$REVISION -> \
+r$MIPS_SVN_REVISION: $MIPS_REVISION_TITLE"
+ MIPS_REVISION_LIST=("${MIPS_REVISION_LIST[@]}" "$MIPS_SVN_REVISION")
+ fi
+ fi
+ fi
+ done
+ # Next step expects a list, not an array.
+ FULL_REVISION_LIST="${FULL_REVISION_LIST[@]}"
+ # Do we find any MIPS port?
+ if [ ${#MIPS_REVISION_LIST[@]} -ne 0 ] ; then
+ confirm "Automatically add corresponding MIPS ports (${MIPS_REVISION_LIST[@]})?"
+ #: 'n': Restore the original revision list.
+ if [ $? -ne 0 ] ; then
+ FULL_REVISION_LIST="$@"
+ fi
+ fi
+fi
+
+let CURRENT_STEP+=1
+if [ $START_STEP -le $CURRENT_STEP ] ; then
echo ">>> Step $CURRENT_STEP: Find the git \
revisions associated with the patches."
current=0
- for REVISION in "$@" ; do
+ 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.
NEXT_HASH=$(git svn find-rev "r$REVISION" svn/bleeding_edge)
[[ -n "$NEXT_HASH" ]] \
|| die "Cannot determine git hash for r$REVISION"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698