1 ##################################################
2 # utility bash functions to help with merging #
3 ##################################################
4 # copyright 2003 David Mansfield #
5 ##################################################
6 # usage: . merge_utils.sh #
7 ##################################################
13 less $PATCHSETDIR/$1.
patch
20 cat $PATCHSETDIR/$1.
patch |
patch -p1 --dry-run
27 cat $PATCHSETDIR/$1.
patch |
patch -p1
31 # commit changes as merge of patchset.
34 LOGMSG
=`cat $PATCHSETDIR/$1.patch | perl -e '$line = 0; while(<>) {
35 if ($line == 1) { if (/PatchSet ([[:digit:]]*)/) { $ps = $1; }}
36 if ($line == 2) { if (/Date: (.*)/) { $dt = $1; }}
37 if ($line == 4) { if (/Branch: (.*)/) { $br = $1; }}
38 if ($line == 7) { $lg = $_; chop($lg) }
41 print "Merge ps:$ps date:$dt branch:$br log:$lg\n";
43 echo Committing with log message
"'$LOGMSG'"
46 cvs commit
-m"$LOGMSG"
50 echo "Don't forget to set \$PATCHSETDIR to the directory where you patchset diffs are"