summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-04-14 13:14:19 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-04-14 13:14:19 -0400
commit69244b212dba783e1a1b00661ecd5ce55ce0a2d0 (patch)
tree10dbb42c8296186a1afc2f962960686a898890fe
parent3102bad60da4281e805d3c5079f2e0c864dc7871 (diff)
downloadlongterm-queue-2.6.34-69244b212dba783e1a1b00661ecd5ce55ce0a2d0.tar.gz
merge good bits from send-queue into queue-builder
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rwxr-xr-xscripts/queue-builder33
-rwxr-xr-xscripts/send-queue50
2 files changed, 26 insertions, 57 deletions
diff --git a/scripts/queue-builder b/scripts/queue-builder
index 850e7a4..89673b3 100755
--- a/scripts/queue-builder
+++ b/scripts/queue-builder
@@ -25,12 +25,9 @@ BASE_VER=v$VERSION.$PATCHLEVEL.$SUBLEVEL
# Length of review cycle.
HOURS=72
-if [ -z "$1" ];then
- echo must supply queue dir
- exit 1
-fi
-
-QUEUE_PATH=$1
+HERE=`dirname $0`
+HEADER=$HERE/../misc/header
+QUEUE_PATH=$HERE/../queue
SERIES=$QUEUE_PATH/series
if [ ! -f $SERIES ];then
@@ -73,6 +70,7 @@ do
exit 1
fi
+ echo -n "$COUNT: "
git am $QUEUE_PATH/$i
if [ $? != 0 ];then
echo commit $COUNT: git am of $i failed. STBU.
@@ -82,12 +80,16 @@ done
# Crap them back out as a numbered, prefixed group for gse.
+PATCHLOG=`mktemp`
echo Creating patches in $BRANCH-patches
git format-patch --cover-letter --subject-prefix="34-longterm" \
- -o $BRANCH-patches $EXTRA_VER..$BRANCH > /tmp/00-patchgen.log 2>&1
+ -o $BRANCH-patches $EXTRA_VER..$BRANCH > $PATCHLOG 2>&1
if [ $? != 0 ]; then
echo format patch didnt return zero - check results\!
+ echo Log is in $PATCHLOG
+ exit 1
fi
+rm -f $PATCHLOG
NEWCOUNT=`ls -1 $BRANCH-patches/|grep -v 0000-cover-letter.patch|wc -l`
if [ $COUNT -ne $NEWCOUNT ];then
@@ -113,3 +115,20 @@ sed -i 's/\*\*\* SUBJECT HERE \*\*\*/'$BASE_VER.$DOT' longterm review/' \
( echo '/BLURB HERE/d' ;echo ".-1r $MESSAGE" ; echo w ; echo q) |\
ed -s $BRANCH-patches/0000-cover-letter.patch
+# And munge a header onto each patch...
+for i in `ls -1 $BRANCH-patches/|grep -v 0000-cover-letter.patch` ; do
+ (echo '/^$/,r '$HEADER ; echo w ; echo q ) | ed -s $BRANCH-patches/$i
+ if [ $? != 0 ];then
+ echo adding header to $i failed
+ exit 1
+ fi
+done
+
+MT=`find $BRANCH-patches -empty`
+if [ -n "$MT" ]; then
+ echo something evil happened. You have zero sized patches in:
+ echo $MT
+ exit 1
+fi
+
+exit 0
diff --git a/scripts/send-queue b/scripts/send-queue
deleted file mode 100755
index a69d68e..0000000
--- a/scripts/send-queue
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# Dump out a bunch of patches suitable for GSE'ing for review
-# Munge in a header to indicate it is stable.
-
-VERSION=`git show HEAD:Makefile|grep ^VERSION|awk '{print $3}'`
-PATCHLEVEL=`git show HEAD:Makefile|grep ^PATCHLEVEL|awk '{print $3}'`
-SUBLEVEL=`git show HEAD:Makefile|grep ^SUBLEVEL|awk '{print $3}'`
-EXTRAVERSION=`git show HEAD:Makefile|grep ^EXTRAVERSION|awk '{print $3}'`
-
-LATEST=v$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION
-
-HERE=`dirname $0`
-HEADER=$HERE/../misc/header
-PATCHDIR=next
-
-COUNT=`git rev-list $LATEST..HEAD |wc -l`
-echo Most recent release is $LATEST, dumping $COUNT patches into $PATCHDIR.
-
-
-rm -rf $PATCHDIR
-mkdir -p $PATCHDIR
-
-LOG=`mktemp`
-
-git format-patch --no-stat -N --subject-prefix=34-longterm \
- --cover-letter -o $PATCHDIR $LATEST..HEAD > $LOG 2>&1
-
-if [ $? != 0 ]; then
- cat $LOG
-else
- rm $LOG
-fi
-
-MT=`find $PATCHDIR -empty`
-
-if [ -n "$MT" ]; then
- echo something evil happened. You have zero sized patches in:
- echo $MT
- exit 1
-fi
-
-cd $PATCHDIR
-for i in `echo *.patch ` ; do
- (echo '/^$/,r '$HEADER ; echo w ; echo q ) | ed -s $i
- if [ $? != 0 ];then
- echo adding header to $i failed
- exit 1
- fi
-done