]> git.ozlabs.org Git - next-scripts/commitdiff
do_merge: updates
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Feb 2010 23:10:32 +0000 (10:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Feb 2010 23:10:32 +0000 (10:10 +1100)
cope with / in branch names
don't stop if rerere fixed all the merge problems
auto apply merg fixup patches

do_merge

index 789d3619a102ce5f91576dba9954ae7e447400c3..985a34c54d96979ef6a01179ef84ff110a9cff49 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -46,7 +46,7 @@ heads=$(grep -v '^#' ../real_control | awk -F '       ' '$2=="quilt" { printf("quilt/%
 need_build=false
 
 for h in $heads; do
-       tree=${h%/*}
+       tree=${h%%/*}
        [ "$tree" == "quilt" ] && tree=${h#quilt/}
 
        [ -n "$start_from" ] && {
@@ -61,10 +61,21 @@ for h in $heads; do
        old_head=$(git rev-parse HEAD)
        execute git merge $h || {
                echo Merge failed 1>&2
-               bash -i || exit
+               echo $h >>../merge.debug
+               git diff >>../merge.debug 2>&1
+               git diff 2>&1 | egrep -q '<<<<<|^\*' && {
+                       bash -i || exit
+               }
                GIT_EDITOR=: execute git commit -v -a
                execute git diff -M --stat --summary 'HEAD^..'
        }
+       [ -f "../merge-fixes/$tree" ] && {
+               for p in $(cat "../merge-fixes/$tree"); do
+                       ../tools/merge_fix -n "$p" || {
+                               bash -i || exit
+                       }
+               done
+       }
        $no_build && continue
        $need_build || {
                # See if we need to build after merging this tree