3 today="$(date '+%Y%m%d')"
12 . "$(dirname $0)/common.sh"
16 echo "$@" | tee -a $LOG_FILE
22 $@ 2>&1 | tee -a $LOG_FILE
23 return ${PIPESTATUS[0]}
28 git branch -f akpm-current/current akpm/current
30 git branch -f akpm/base HEAD
32 old_head=$(git rev-parse HEAD)
33 hlog=$(git log -1 --oneline akpm-current/current) 2>/dev/null
34 log Merging akpm-current/current "($hlog)"
35 execute git merge --no-ff akpm-current/current || {
36 echo Merge failed 1>&2
37 echo $h >>../merge.debug
38 git diff >>../merge.debug 2>&1
40 check_unmerged_files akpm-current
42 git diff 2>&1 | egrep -q '<<<<<|^\*' && {
45 GIT_EDITOR=: execute git commit -v -a
46 execute git diff -M --stat --summary 'HEAD^..'
48 printf "%s\t%s\n" akpm-current $(git show-ref --hash akpm-current/current) >> $SHA1_FILE
50 [ -f "../merge-fixes/akpm-current" ] && {
51 for p in $(cat "../merge-fixes/akpm-current"); do
52 $(dirname $0)/merge_fix -n "$p" || {
58 new_head=$(git rev-parse HEAD)
61 [ "$old_head" = "$new_head" ] ||
62 [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
64 git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || {
65 echo git push failed 1>&2
68 "$bin_dir/do_build" akpm-current || {
69 echo Build failed 1>&2
74 execute git clone -s -l -n -q . ../rebase-tmp || {
75 echo Clone failed 1>&2
78 log '$' cd ../rebase-tmp
80 execute git checkout -b akpm remotes/origin/akpm/master || {
81 echo Checkout of remotes/origin/akpm/master failed 1>&2
84 execute git rebase --onto master remotes/origin/akpm/master-base || {
85 echo Rebase failed 1>&2
89 linux-next-notify "Waiting for akpm fix up"
93 execute git fetch -f ../rebase-tmp akpm:akpm/master || {
94 echo Fetch of akpm/master failed 1>&2
97 execute rm -rf ../rebase-tmp
99 git branch -f akpm/master-base HEAD
101 old_head=$(git rev-parse HEAD)
102 log Merging akpm/master '('$(git log -1 --oneline akpm/master)')'
103 execute git merge --no-ff akpm/master || {
104 echo Merge failed 1>&2
107 printf "%s\t\t%s\n" akpm $(git show-ref --hash akpm/master) >> $SHA1_FILE
109 [ -f "../merge-fixes/akpm" ] && {
110 for p in $(cat "../merge-fixes/akpm"); do
111 $(dirname $0)/merge_fix -n "$p" || {
117 new_head=$(git rev-parse HEAD)
120 [ "$old_head" = "$new_head" ] ||
121 [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || {
123 git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || {
124 echo git push failed 1>&2
127 "$bin_dir/do_build" akpm || {
128 echo Build failed 1>&2