]> git.ozlabs.org Git - next-scripts/blobdiff - merge_msg
check_fixes: give more advice
[next-scripts] / merge_msg
index e436cd5f24307db791c114777a440e397e3fd82e..38e6e2e6113d3494806c5163e24009a946c097b3 100755 (executable)
--- a/merge_msg
+++ b/merge_msg
@@ -1,36 +1,44 @@
 #!/bin/bash
 
-log=../merge.log
-[ -f merge.log ] && log=merge.log
-control=../real_control
-[ -f real_control ] && control=real_control
-
 branch=""
 [ "$1" = "-t" ] && {
-        branch=$2
+        branch="-t $2"
         shift 2
 }
 
-[ "$branch" ] || {
-       branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//')
-       branch=${branch%%/*}
-}
+gitk --merge -- "$@" &
+# [ "$#" ] && gvim "$@" 2>/dev/null
+
+printf -v files "  %s\n" "$@"
+conf="a conflict"
+[ "$#" -gt 1 ] &&
+       conf="conflicts"
+
+subject="manual merge of the BRANCH tree with the FIXME tree"
+
+$(dirname $0)/message_helper $branch "$subject" <<EOF
+FIXME: Add owner of second tree to To:
+       Add author(s)/SOB of conflicting commits.
+
+Today's linux-next merge of the BRANCH tree got $conf in:
+
+$files
+between commit:
+
+   ("")
 
-contact=$(awk -F '     ' '$3=="'"$branch"'" { print $1; }' $control)
-greeting=${contact%% *}
-greeting=${greeting#\"}
-[ "${contact%,*}" = "${contact}" ] || greeting="all"
+from the FIXME tree and commit:
 
-file="$*"
+   ("")
 
-gitk --merge -- $file &
-[ "$file" ] && gvim $file
+from the BRANCH tree.
 
-sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org,%20linux-kernel@vger.kernel.org&Subject=linux-next: manual merge of the $branch tree with the  tree&Body=Hi $greeting,%0A\
-%0A\
-Today's linux-next merge of the $branch tree got a conflict in $file between commit  (%22%22) from the  tree and commit  (%22%22) from the $branch tree.%0A\
-%0A\
-I fixed it up (see below) and can carry the fix as necessary (no action%0A\
-is required)."
+I fixed it up (see below) and can carry the fix as necessary. This
+is now fixed as far as linux-next is concerned, but any non trivial
+conflicts should be mentioned to your upstream maintainer when your tree
+is submitted for merging.  You may also want to consider cooperating
+with the maintainer of the conflicting tree to minimise any particularly
+complex conflicts.
+EOF
 
 exit 0