[svn-r13162] Purpose:

Upgrade.

Description:
svn version 1.4.x uses a different format of .svn/entries files as older
versions like 1.3.x.  chkmanifest could not parse the file correctly.

Solution:
Created different versions of entries file parsing according to svn version.
There is also a bug in grep that matches ./configure with ./fortran/configure.
Don't know how to or even possible to nullify the wildcard character effect
of '.'.  Added a ^ to mark beginning of line.  At least it makes it the same
length though it would still match with "X/configure".  Hopefully this sort
of error are easier to detect by human
This commit is contained in:
Albert Cheng 2007-01-21 01:09:25 -05:00
parent 416f0145ab
commit 7d4e3a676b

View File

@ -22,8 +22,8 @@ MANIFEST=/tmp/H5_MANIFEST.$$
# function definitions
GETSVNENTRIES ()
# Purpose: Extract filenames from the svn entries file
GETSVNENTRIES_13 ()
# Purpose: Extract filenames from the svn v1.3.* entries file
# $1: directory name in which the svn entries is.
# steps:
# 1. remove all single line entries so that step 2 does not fail on them.
@ -54,6 +54,29 @@ cat $SVNENTRY
rm $SVNENTRY
}
GETSVNENTRIES_14 ()
# Purpose: Extract filenames from the svn v1.4.* entries file
# $1: directory name in which the svn entries is.
# steps:
# 1. all valid files are followed by a line containing "file" only.
# 2. find them by looking for "file" first, then mark its preceding line as
# wanted.
# 3. remove all non-marked line.
{
SVNENTRY=/tmp/H5_SVNENTRY.$$
cp $1/entries $SVNENTRY
chmod u+w $SVNENTRY # entries file is not writable.
ed - $SVNENTRY <<EOF
g/^file$/-s/^/%WANTED%/
v/%WANTED%/d
%s/%WANTED%//
w
q
EOF
cat $SVNENTRY
rm $SVNENTRY
}
# Main
test "$verbose" && echo " Checking MANIFEST..." 1>&2
@ -88,10 +111,26 @@ for file in `cat $MANIFEST`; do
fi
done
# According to svn version, figure out the right version of GETSVNENTRIES
# to use.
svnversion=`svn --version --quiet`
case "$svnversion" in
1.4.*)
getsvnentries=GETSVNENTRIES_14
;;
1.3.*)
getsvnentries=GETSVNENTRIES_13
;;
*) #default to 1.3
getsvnentries=GETSVNENTRIES_13
;;
esac
for svn in `find . -type d -name .svn -print`; do
path=`echo $svn |sed 's/\/.svn//'`
for file in `GETSVNENTRIES $svn`; do
if (grep $path/$file$ $MANIFEST >/dev/null); then
for file in `$getsvnentries $svn`; do
if (grep ^$path/$file$ $MANIFEST >/dev/null); then
:
else
echo "+ $path/$file"