From 7d4e3a676beda175e395ede4f1ed90ee24adaeae Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sun, 21 Jan 2007 01:09:25 -0500 Subject: [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 --- bin/chkmanifest | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file 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 <&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" -- cgit v0.12