]> git.ozlabs.org Git - next-scripts/blob - merge_msg
various updates
[next-scripts] / merge_msg
1 #!/bin/bash
2
3 log=../merge.log
4 [ -f merge.log ] && log=merge.log
5 control=../real_control
6 [ -f real_control ] && control=real_control
7
8 branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//')
9 branch=${branch#quilt/}
10 branch=${branch%%/*}
11
12 contact=$(awk -F '      ' '$3=="'"$branch"'" { print $1; }' $control)
13 greeting=${contact%% *}
14 greeting=${greeting#\"}
15 [ "${contact%,*}" = "${contact}" ] || greeting="all"
16
17 file="$*"
18
19 gitk --merge -- $file &
20 [ "$file" ] && gvim $file
21
22 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\
23 %0A\
24 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."
25
26 exit 0