summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-01-21 06:09:25 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-01-21 06:09:25 (GMT)
commit7d4e3a676beda175e395ede4f1ed90ee24adaeae (patch)
tree8f0bc4b828fd23ac8844a9c13fda294b41c21c3a
parent416f0145abe0396718831f460c0a4d4a4dea11de (diff)
downloadhdf5-7d4e3a676beda175e395ede4f1ed90ee24adaeae.zip
hdf5-7d4e3a676beda175e395ede4f1ed90ee24adaeae.tar.gz
hdf5-7d4e3a676beda175e395ede4f1ed90ee24adaeae.tar.bz2
[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
-rwxr-xr-xbin/chkmanifest47
1 files changed, 43 insertions, 4 deletions
diff --git a/bin/chkmanifest b/bin/chkmanifest
index f82b477..81a911f 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -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"