#!/bin/bash
+host="fs"
+[ "$1" ] && host="$1"
+
rsync -avHP --include next/.git --include next/.git/'**' --exclude next/'**' \
--include quilt/.git --include quilt/.git/'**' --exclude quilt/'**' \
- --delete --delete-excluded next/ fs:next/
+ --delete --delete-excluded next/ "$host":next/
#!/bin/bash
-IFS=' '
-
origwd=$(pwd)
-while read email type name url ref; do
- [[ "$email" =~ '^#.*$' ]] && {
- echo $name: skipped
- continue
- }
+get_field()
+{
+ grep -v '^#' ../real_control |
+ awk -F ' ' '$3 == "'$1'" { print $'$2'; }'
+}
+
+trees=$(grep -v '^#' ../real_control | awk -F ' ' '{ print $3 }')
+
+for name in $trees; do
+ type=$(get_field "$name" 2)
+
echo $name: $type
if [ "$type" = "git" ]; then
git fetch "$name"
continue
fi
+
if [ "$type" = "quilt" ]; then
+ url=$(get_field "$name" 4)
+
case "$url" in
http://kernel.org/*|http://www.kernel.org/*)
use_rsync=true
rm -f .series.old .series.next
cd "$origwd"
fi
-done <../real_control
+done
cd ../quilt
git add .
echo "$0: <commit id> [<top tag> [<linus branch>]]" 1>&2
exit 1
}
+commit=$(git rev-parse --verify "$commit")
+[ "$commit" ] ||
+ exit 1
top=$2
[ "$top" ] || top=HEAD
base=$(git merge-base "$linus" "$top")
-git log --first-parent --pretty='format:%H %P' "$base".."$top" |
+git log --first-parent --reverse --pretty='format:%H %P' "$base".."$top" |
while read m p1 p2
do
- [ "$p2" ] || continue
+ [ "$p1" = "$commit" ] && {
+ echo "Directly committed"
+ break
+ }
+ [ "$p2" ] ||
+ continue
git rev-list $base..$p2 | grep -q "$commit" || continue
- branch=$(git show $m | sed -n "s/[ ]*Merge .* '\([^']*\)'/\1/p")
- tree=${branch%%/*}
- [ "$tree" = "quilt" ] && tree=${branch##*/}
- echo "$tree"
+ branch=$(git show $m | sed -n "s/[ ]*Merge .*'\([^']*\)'\( of \([^ ]*\).*\)*$/\1|\3/p")
+ tree=${branch##*|}
+ branch=${branch%%|*}
+ [ "$tree" ] || {
+ tree=${branch%%/*}
+ [ "$tree" = "quilt" ] && tree=${branch##*/}
+ echo "$tree"
+ break
+ }
+ echo "$tree#$branch"
break
done
--- /dev/null
+#!/bin/bash
+
+d="$1"
+
+[ -d ../abat ] || mkdir ../abat
+
+i=1
+for t in "IBM,9124-720 eServer OpenPower 720" "IBM,9110-51A System p5 510" "IBM,9117-MMA System p 570"
+do
+ cat >"../abat/$d-abat.ozlabs.ibm.com-$i" <<EOF
+option title linux-next $d boot test
+class next type="$t"
++\$kernel "master^"
++\$config http://ozlabs.au.ibm.com/~tony/abat/configs/no_CONFIG_LOCALVERSION_AUTO.config
+build generic git git://fs.ozlabs.ibm.com/home/kernel/linux-next.git \$kernel -c \$config -m -j\$num_cpus
+boot initcall_debug
+EOF
+ i=$((i + 1));
+done
+
+i=1
+for t in 'type="88552RZ"' 'type="IBM eServer BladeCenter LS20 -[885055U]-"' 'type="-[622142U]-"' 'type="PowerMac7,2"' 'machine_name="js22-bup1"'
+do
+ cat >"../abat/$d-abat.linux.ibm.com-$i" <<EOF
+option title linux-next $d boot test
+class next $t
++\$kernel "master^"
++\$config http://ozlabs.au.ibm.com/~tony/abat/configs/no_CONFIG_LOCALVERSION_AUTO.config
+build generic git git://ozlabs.au.ibm.com/srv/git/sfr/next.git \$kernel -c \$config -m -j\$num_cpus
+boot initcall_debug
+EOF
+ i=$((i + 1));
+done
+
+exit 0
--- /dev/null
+#!/bin/bash
+
+LOG_FILE="../merge.log"
+build_host="sprygo"
+build_dir="/scratch/sfr/next"
+build_cmd="bin/build_next"
+
+no_build=false
+[ "$1" = "-n" ] && {
+ shift
+ no_build=true
+}
+
+tree=$1
+ver=$2
+
+rev=$(git rev-parse -verify "next-$ver/$tree")
+[ "$rev" ] || {
+ echo "No such tree/date" 1>&2
+ exit 1
+}
+
+[ -n "$3" ] && build_host="$3"
+
+log()
+{
+ echo "$@" | tee -a $LOG_FILE
+}
+
+execute()
+{
+ log "$" $@
+ $@ 2>&1 | tee -a $LOG_FILE
+ return ${PIPESTATUS[0]}
+}
+
+GIT_EDITOR=: execute git reset --hard 'HEAD^' || {
+ echo "git reset failed" 1>&2
+ bash -i || exit
+}
+
+log Merging "next-$ver/$tree"
+execute git merge "next-$ver/$tree" || {
+ echo Merge failed 1>&2
+ bash -i || exit
+ GIT_EDITOR=: execute git commit -v -a
+ execute git diff -M --stat --summary 'HEAD^..'
+}
+
+$no_build && exit 0
+
+rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || {
+ echo Rsync failed 1>&2
+ bash -i || exit
+}
+
+echo "Building using $build_cmd on $build_host"
+ssh "$build_host" "$build_cmd" || {
+ echo Build failed 1>&2
+ bash -i || exit
+}
+
+d=$(date --date "5 hours ago" '+%Y%m%d')
+git update-ref "refs/heads/next-$d/broken/$tree" "refs/heads/next-$d/$tree"
+git update-ref "refs/heads/next-$d/$tree" "refs/heads/next-$ver/$tree"
+
+exit 0
--- /dev/null
+#!/bin/bash --norc
+
+LOG_FILE="../summary"
+
+cp /dev/null $LOG_FILE
+
+log()
+{
+ echo "$@" | tee -a $LOG_FILE
+}
+
+patch_and_sha_ids()
+{
+ echo "$*" | xargs -r -n 1 git diff-tree -p | git patch-id | sort
+}
+
+patch_ids()
+{
+ patch_and_sha_ids "$@" | cut -d' ' -f1
+}
+
+heads=$(grep -v '^#' ../real_control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }')
+
+seen_ids=""
+seen_heads=""
+seen_sha1s=""
+
+for h in $heads; do
+ mb=$(git merge-base origin/master $h)
+ rh=$(git rev-parse $h)
+ [ "$mb" = "$rh" ] && {
+ log $h
+ continue
+ }
+
+ c=$(git rev-list --no-merges $mb...$rh $seen_heads | sort)
+ seen_heads="$seen_heads ^$rh"
+ [ -z "$c" ] && {
+ log $h
+ continue
+ }
+
+# origin_ids=$(patch_ids $(git rev-list --no-merges $mb..origin/master))
+
+ is=$(patch_and_sha_ids $c)
+# is=$(join -v 1 <(echo "$is") <(echo "$origin_ids"))
+ is=$(join -v 1 <(echo "$is") ../origin1.ids)
+ is=$(join -v 1 <(echo "$is") <(echo "$seen_ids"))
+ c1=$(echo "$is" | cut -d' ' -f2)
+ [ "$is" ] && seen_ids=$( (echo "$seen_ids"; echo "$is" | cut -d' ' -f1) | sort)
+
+ log $h \($(echo "$c" | wc -w) $(echo "$c1" | wc -w)\)
+
+ seen_sha1s="$seen_sha1s $c1"
+done
+
+log
+git shortlog --no-walk $seen_sha1s 2>&1 | tee -a $LOG_FILE
+
+exit 0