- Script to check for revisions in trunk, not yet in branch.
To show help information: bash ompi_branch_check_revisions.sh -h For parsing & coloring of notes file: bash ompi_branch_check_revisions.sh -p > v1.5.html This commit was SVN r22822.
Этот коммит содержится в:
родитель
b43d621f30
Коммит
0a121f50c2
106
contrib/ompi_branch_check_revisions-v1.5.txt
Обычный файл
106
contrib/ompi_branch_check_revisions-v1.5.txt
Обычный файл
@ -0,0 +1,106 @@
|
||||
#
|
||||
# Input file for script ompi_branch_check_revisions.sh
|
||||
# here for the v1.5 branch
|
||||
#
|
||||
# Contains optional notes for revisions, about:
|
||||
# 1. reasons, why this revision ought not to be merged
|
||||
# 2. dependencies on other revisions (if any known)
|
||||
# 3. existing CMRs
|
||||
#
|
||||
# Yes this file is optional, also revisions, that do not show
|
||||
# up in `svn mergeinfo --svn eligible` are not required
|
||||
# here (but don't hurt either).
|
||||
#
|
||||
|
||||
# R-number, TYPE
|
||||
r22451, Win Mailed
|
||||
r22452, Win Mailed Depends on r22451
|
||||
r22453, Win Mailed Depends on r22452
|
||||
r22454, Win Mailed Depends on r22453
|
||||
r22455, Win Mailed
|
||||
r22456, Win Mailed
|
||||
r22460, MERGED
|
||||
r22465, Cleanup
|
||||
r22466, Cleanup
|
||||
r22467, Superseded by r22496
|
||||
r22470, Doc
|
||||
r22471, RTE BUGFIX?
|
||||
r22472, RTE efficiency RMCAST
|
||||
r22480, RTE Feature
|
||||
r22485, Doc (man-page)
|
||||
r22493, Doc
|
||||
r22494, Doc
|
||||
r22495, Doc
|
||||
r22497, Doc in m4
|
||||
r22499, Cleanup
|
||||
r22500, Doc Cleanup
|
||||
r22501, Platform files
|
||||
r22502, Platform files
|
||||
r22507, RTE RMCAST
|
||||
r22509, RTE BUGFIX
|
||||
r22520, Win Build Fix
|
||||
r22523, Doc
|
||||
r22524, Doc
|
||||
r22537, RTE Fix Mailed
|
||||
r22538, RTE Fix ess/cm Mailed
|
||||
r22539, RTE Fix ess/cm Mailed
|
||||
r22540, Win Mailed
|
||||
r22541, RTE Fix Mailed
|
||||
r22560, Win Build Fix Mailed
|
||||
r22561, Win Mailed
|
||||
r22563, Win Mailed
|
||||
r22564, RTE spawn fix cmr:v1.5.1:#2235
|
||||
r22565, Win Mailed
|
||||
r22566, Cleanup
|
||||
r22567, Doc fix
|
||||
r22568, Win Mailed
|
||||
r22579, MERGED Discard due to test commit and reversal in next commit
|
||||
r22580, MERGED Discard
|
||||
r22587, Buglet (errno.h)
|
||||
r22591, Small update for mpi_portable_platform.h.in
|
||||
r22603, Doc
|
||||
r22605, Doc
|
||||
r22606, IB Doc
|
||||
r22608, RTE feature
|
||||
r22609, MERGED Discard due to reversal in r22611
|
||||
r22610, Win build fix Mailed
|
||||
r22609, MERGED Discard, see r22609
|
||||
r22610, Win build fix Mailed
|
||||
r22613, RTE Doc depends on r22608
|
||||
r22615, New OPAL class for ring-buffer
|
||||
r22616, RTE RMCAST depends on r22615
|
||||
r22618, Win compile fix Mailed
|
||||
r22634, Depends on r22619
|
||||
r22640, NetBSD Fix Depends on future cmr:v1.5:#2272
|
||||
r22641, Doc and DDT Check fix (Depends on XXX)
|
||||
r22642, Doc and DDT fix (depends on r22641)
|
||||
r22643, RTE fix errorcode Mailed
|
||||
r22650, RTE RMCAST depends on r22616
|
||||
r22660, Cleanup
|
||||
r22663, Build Cleanup
|
||||
r22664, ASM Fix! cmr:v1.5:#2278
|
||||
r22665, ASM Fix! cmr:v1.5:#2278
|
||||
r22669, Fix TCP Mailed and cmr:v1.5:#2326
|
||||
r22673, Win build fix Mailed
|
||||
r22674, MERGED (in r22763 and not discovered via svn mergeinfo)
|
||||
r22675, IB locking fix! cmr:v1.5:#2335
|
||||
r22676, IB locking fix! cmr:v1.5:#2335
|
||||
r22677, MERGED
|
||||
r22678, IB locking fix! cmr:v1.5:#2335
|
||||
r22679, IB locking fix! cmr:v1.5:#2335
|
||||
r22680, MERGED (in r22699 and not disocvered via svn mergeinfo)
|
||||
r22682, IB locking fix! cmr:v1.5:#2335
|
||||
r22683, IB locking fix! cmr:v1.5:#2335
|
||||
r22684, IB locking fix! cmr:v1.5:#2335
|
||||
r22688, MERGED (in r22764)
|
||||
r22689, cmr:v1.5:#2334
|
||||
r22691, cmr:v1.5:#2303 MERGED (in r22808 and not discovered via svn mergeinfo)
|
||||
r22700, IB locking fix! cmr:v1.5:#2338
|
||||
r22701, MERGED (in r22764)
|
||||
r22703, MERGED (in r22808 and not discovered via svn mergeinfo)
|
||||
r22706, cmr:v1.5:#2334
|
||||
r22710, RTE RMCAST
|
||||
r22714, cmr:v1.5:#2334
|
||||
r22721, MERGED (in r22764)
|
||||
r22722, Fix TCP Mailed and cmr:v1.5:#2326 depends on r22669
|
||||
r22724, cmr:v1.5:#2334
|
198
contrib/ompi_branch_check_revisions.sh
Исполняемый файл
198
contrib/ompi_branch_check_revisions.sh
Исполняемый файл
@ -0,0 +1,198 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Some initialization
|
||||
#
|
||||
WANT_HTML=1
|
||||
BRANCH_VERSION="v1.5"
|
||||
TRAC_URL="https://svn.open-mpi.org/trac/ompi"
|
||||
TRUNK_URL="https://svn.open-mpi.org/svn/ompi/trunk/"
|
||||
RELATIVE_URL="https://svn.open-mpi.org/svn/ompi/branches/$BRANCH_VERSION"
|
||||
# XXX might be really tmp by spec $$
|
||||
TMP_REVS="$TMPDIR/ompi_revs.txt"
|
||||
REVS_NOTES="ompi_branch_check_revisions-$BRANCH_VERSION.txt"
|
||||
MERGE_LOG="$TMPDIR/ompi_merge_log.txt"
|
||||
MERGE_FILE="$TMPDIR/ompi_merge.txt"
|
||||
|
||||
MSG_WIDTH=90
|
||||
PARSE_REVS=0
|
||||
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Outputs a HTML or a comma-separated file, listing outstanding r-numbers."
|
||||
echo "May use an input file per branch, describing notes such as pending CMRs,"
|
||||
echo "dependencies or reasons, why a revision should not be moved."
|
||||
echo ""
|
||||
echo "Usage: $0 [-h] [-b Branch] [-u URL] [-o Output Type]"
|
||||
echo ""
|
||||
echo "-h This help"
|
||||
echo "-b Branch version, which is appended to default URL [default:v1.5]"
|
||||
echo "-u URL to compare to [default: https://svn..../ompi/branches/BRANCH_VERSION]"
|
||||
echo "-o Output Type, possible: txt, html [default:html]"
|
||||
echo "-w Width of commit msg. that will be cut at [default:90]"
|
||||
echo "-m Merge file [default: extract from svn log of BRANCH_VERSION]"
|
||||
echo "-r Revision file with notes [default:svn update of `basename $0 .sh`-BRANCH_VERSION.txt]"
|
||||
echo "-p Parse revision file notes (see notes below) [default:off]"
|
||||
echo ""
|
||||
echo "When parsing the revision file notes (see option -r), the following marks will be done"
|
||||
echo " MAILED Author has been made aware of filing a CMR"
|
||||
echo " CMR:BRANCH[:NUM] There exists a CMR (with link to TRACS)"
|
||||
echo " MERGED The Revision will not show up in the output"
|
||||
echo "The markings are in increasing order, i.e. if MERGED is part of notes the line is not shown."
|
||||
exit 1
|
||||
}
|
||||
|
||||
function check_svn_url()
|
||||
{
|
||||
URL=$1
|
||||
|
||||
svn list $URL > /dev/null 2>&1
|
||||
if test $? != 0 ; then
|
||||
echo "ERROR: The provided URL:$URL is not correct or cannot svn list"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Check the options
|
||||
#
|
||||
while getopts "b:o:u:w:m:r:ph" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
BRANCH_VERSION=$OPTARG
|
||||
RELATIVE_URL="https://svn.open-mpi.org/svn/ompi/branches/$BRANCH_VERSION"
|
||||
;;
|
||||
o)
|
||||
if test "$OPTARG" = "html" ; then
|
||||
WANT_HTML=1
|
||||
elif test "$OPTARG" = "txt" ; then
|
||||
WANT_HTML=0
|
||||
else
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
u)
|
||||
RELATIVE_URL=$OPTARG
|
||||
;;
|
||||
w)
|
||||
MSG_WIDTH=$OPTARG
|
||||
;;
|
||||
m)
|
||||
MERGE_FILE=$OPTARG
|
||||
;;
|
||||
r)
|
||||
REVS_NOTES=$OPTARG
|
||||
;;
|
||||
p)
|
||||
PARSE_REVS=1
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument."
|
||||
usage
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG"
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check the URLs
|
||||
check_svn_url $TRUNK_URL
|
||||
check_svn_url $RELATIVE_URL
|
||||
|
||||
|
||||
svn mergeinfo --show-revs eligible $TRUNK_URL $RELATIVE_URL > $TMP_REVS
|
||||
if test \! -f $TMP_REVS ; then
|
||||
echo "ERROR: TMP_REVS:$TMP_REVS file is not available"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
svn update $TRUNK_URL/contrib/$REVS_NOTES > /dev/null 2>&1
|
||||
|
||||
# If there is no notes file (nothing checked out, nothing local) reset NOTES
|
||||
if test \! -f $REVS_NOTES ; then
|
||||
unset REVS_NOTES
|
||||
NOTES=""
|
||||
fi
|
||||
|
||||
# The ALREADY merged (but by means of "svn mergeinfo" not recognised)
|
||||
# revisions can be "savely" parsed:
|
||||
if test $PARSE_REVS = 1 ; then
|
||||
svn log --incremental --stop-on-copy $RELATIVE_URL > $MERGE_LOG
|
||||
grep '^From r' $MERGE_LOG | sed -e 's/From \(r[0-9]*\):/\1/' > $MERGE_FILE
|
||||
fi
|
||||
|
||||
DATE=`date +%Y.%m.%d`
|
||||
if test "x$WANT_HTML" = "x1" ; then
|
||||
echo "<HTML><HEAD><TITLE>Revisions eligible to merge into $BRANCH_VERSION as of $DATE</TITLE></HEAD>"
|
||||
echo "<TABLE BORDER=1 BGCOLOR=#FFFFFF><TR BGCOLOR=#CCCCCC><TH>Revision</TH><TH>Author</TH><TH>Commit Msg.</TH><TH>Notes</TH></TR>"
|
||||
else
|
||||
echo "# Revisions eligible to merge from trunk into $BRANCH_VERSION as of $DATE"
|
||||
echo "# Revision, Author, Commit Msg, Notes"
|
||||
fi
|
||||
|
||||
OLD_IFS=$IFS
|
||||
IFS='^'
|
||||
LINE_ODD=0;
|
||||
while read REV ; do
|
||||
LOG=`svn log -r$REV $TRUNK_URL`
|
||||
REV_NUMBER=${REV##*r}
|
||||
AUTHOR=`echo $LOG | head -n2 | tail -n1 | cut -f2 -d'|'`
|
||||
MSG=`echo $LOG | head -n4 | tail -n1 | cut -c-$MSG_WIDTH`
|
||||
if test "x$REVS_NOTES" != "x" ; then
|
||||
NOTES=`grep "^$REV" $REVS_NOTES | cut -f2 -d','`
|
||||
fi
|
||||
|
||||
unset BGCOLOR
|
||||
if test $PARSE_REVS = 1 ; then
|
||||
# Mark MAILED as Yellow
|
||||
echo $NOTES | grep -iq "MAILED" && BGCOLOR=#FFFF00
|
||||
# Mark FIX as Red
|
||||
echo $NOTES | grep -iq "FIX" && BGCOLOR=#FF0000
|
||||
# Mark CMR as green -- but only if for this branch
|
||||
echo $NOTES | grep -iq "CMR:$BRANCH_VERSION" && BGCOLOR=#00FF00 && NOTES=`echo $NOTES | sed -e "s%#\([0-9]*\)%\<A HREF=\"$TRAC_URL/ticket/\1\"\>\0\<\/A\>%"`
|
||||
|
||||
# Skip MERGED (investigate why svn merge / svn mergeinfo does not work)
|
||||
echo $NOTES | grep -iq "MERGED" && continue
|
||||
|
||||
# At last, if we found the revision in the MERGE_FILE, skip as well
|
||||
grep -q $REV $MERGE_FILE && continue
|
||||
fi
|
||||
|
||||
if test "x$WANT_HTML" = "x1" ; then
|
||||
# Only overwrite the color if it has not yet been set
|
||||
if test "x$BGCOLOR" = "x" ; then
|
||||
if test $LINE_ODD = 1 ; then
|
||||
BGCOLOR=#EEEEEEE
|
||||
else
|
||||
BGCOLOR=#FFFFFFF
|
||||
fi
|
||||
fi
|
||||
echo "<TR BGCOLOR="$BGCOLOR"><TD><A HREF=\""$TRAC_URL/changeset/$REV_NUMBER"\">$REV</A></TD><TD>$AUTHOR</TD><TD>$MSG</TD><TD>$NOTES</TD></TR>"
|
||||
else
|
||||
echo "$REV, $AUTHOR, \"$MSG\", $NOTES"
|
||||
fi
|
||||
|
||||
if test $LINE_ODD = 0 ; then
|
||||
LINE_ODD=1
|
||||
else
|
||||
LINE_ODD=0
|
||||
fi
|
||||
|
||||
done < $TMP_REVS
|
||||
IFS=$OLD_IFS
|
||||
|
||||
if test "x$WANT_HTML" = "x1" ; then
|
||||
echo "</TABLE></HTML>"
|
||||
else
|
||||
echo "#"
|
||||
fi
|
||||
|
||||
# rm $TMP_REVS $MERGE_LOG $MERGE_FILE
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user