[m-rev.] diff: fix bugs in cvdr
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Apr 19 03:31:16 AEST 2001
Estimated hours taken: 0.5
Branches: main, release
tools/cvdr:
Fix some bugs:
- it wasn't showing the log message or diff for the first entry
on each branch (except the main branch)
- be consistent: pass `-n' to all invocations of cvs
Workspace: /mnt/venus/home/venus/fjh/ws-venus/mercury
Index: tools/cvdr
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/cvdr,v
retrieving revision 1.1
diff -u -d -r1.1 cvdr
--- tools/cvdr 2001/01/20 01:03:54 1.1
+++ tools/cvdr 2001/04/18 17:26:58
@@ -26,7 +26,7 @@
for file in "$@"; do
{
-topversion="`cvs status $file 2>/dev/null | awk '
+topversion="`cvs -n status $file 2>/dev/null | awk '
/ Repository revision:/ { print $3; exit; }
'`"
@@ -46,8 +46,16 @@
echo "Revision $branch.$N"
done
newbranch=`expr match $branch '\(\([0-9]*\.\)*[0-9]*\)\.[0-9]*\.[0-9]*'`
- N=`expr match $branch "$newbranch\.\([0-9]*\)"`
+ N1=`expr match $branch "$newbranch\.\([0-9]*\)"`
+ if [ "$newbranch" != "" ]; then
+ echo cvs log -r$branch.$N $options "$file"
+ cvs -n log -N -r$branch.$N $options "$file" | sed '1,/^-------/d'
+ echo cvs diff -u -r$newbranch.$N1 -r$branch.$N $options "$file"
+ cvs -n diff -u -r$newbranch.$N1 -r$branch.$N $options "$file"
+ echo "Revision $newbranch.$N1"
+ fi
branch=$newbranch
+ N=$N1
done
# We only use CVSROOT to remove it as a prefix to the path in
@@ -60,9 +68,9 @@
FULLFILE=`sed "s^$CVSROOT/^^" CVS/Repository`/"$file"
fi
-echo cvs log -N -r1.1 $options "$file"
-cvs log -N -r1.1 $options "$file" | sed '1,/^-------/d'
+echo cvs log -r1.1 $options "$file"
+cvs -n log -N -r1.1 $options "$file" | sed '1,/^-------/d'
echo cvs checkout -p -r1.1 "$FULLFILE"
-cvs checkout -p -r1.1 "$FULLFILE" 2>&1
+cvs -n checkout -p -r1.1 "$FULLFILE" 2>&1
} | ${PAGER:-more}
done
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list