3 log_file=../akpm-import.log
7 echo "$@" | tee -a $log_file
13 "$@" 2>&1 | tee -a $log_file
14 [ ${PIPESTATUS[0]} -eq 0 ] || $SHELL -i || exit 1
21 [ -f "$mmotm/broken-out/origin.patch" ] &&
22 base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch")
24 base=$(tail -n 1 "$mmotm/.DATE")
28 nbase=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/linux-next.patch")
29 git rev-parse --verify "$base" >/dev/null || {
30 log "Unknown origin BASE $base"
33 git rev-parse --verify "$nbase" >/dev/null || {
34 log "Unknown linux-next BASE $nbase"
37 db=$(git describe "$base")
38 dnb=$(git describe --contains "$nbase")
39 log "Importing akpm based on $db/$dnb"
41 [ -d "../quilt-tmp" ] ||
42 execute git clone -s -l -n -q . ../quilt-tmp
44 log '$' cd ../quilt-tmp
46 execute git checkout -b akpm/master "$db"
47 git branch akpm/current-base
50 /NEXT_PATCHES_START/,/NEXT_PATCHES_END/{
51 s/[ \t]*#.*NEXT_PATCHES_START[ \t]*\([^ \t]*\).*$/>\1/
52 s/[ \t]*#.*NEXT_PATCHES_END.*$/</
57 patches=$(sed -n "$sed_exp" "$sfile")
64 git branch akpm/current
65 execute git merge --no-edit --no-stat "$dnb"
66 git branch akpm/master-base
71 cref="$(git rev-parse --verify HEAD)"
75 [ "$cref" != "$(git rev-parse --verify HEAD)" ] &&
76 git branch -f "akpm/$cbranch"
81 execute git am --patch-format=mbox "$mmotm/broken-out/$f"
87 [ "$cref" != "$(git rev-parse --verify HEAD)" ] &&
88 git branch -f "akpm/$cbranch"
93 execute git fetch --force --no-tags ../quilt-tmp \
94 refs/heads/akpm/master:refs/heads/akpm/master \
95 refs/heads/akpm/master-base:refs/heads/akpm/master-base \
96 refs/heads/akpm/current:refs/heads/akpm/current \
97 refs/heads/akpm/current-base:refs/heads/akpm/current-base