[ On Tuesday, August 8, 2000 at 19:31:52 (-0000), Ramon M. Felciano wrote: ]
> Subject: Determining the last person to commit a file?
>
> Is there a straightforward way to find out who was the last user to
> check in a particular file under CVS? The closest I can figure out is
> to write a script that parses the results of a "cvs log" command --
> is that the only way to do it?
If the file contains a "$Id$" (or "$Header$", not recommended with CVS),
or perhaps "$Author$" (or even $Log$, even less recommended!), and so
long as the RCS file in question does not have the '-ko' flag set,
then you'll instantly see the author of the last revision when you view
the content, or value, of the keyword as it is expanded in the most
recent revision of the file.
However without looking at the most recent revision of the file
directly, (or indeed the RCS file in the repo), yes, using "cvs log" is
the most correct way to find the author of the last commit.
cvs log newsyslog.c | \
sed -n -e '1,/^---/d;n;p;q' | \
awk -F\; '{print $2}' 2>/dev/null
--
Greg A. Woods
+1 416 218-0098 VE3TCP <[EMAIL PROTECTED]> <robohack!woods>
Planix, Inc. <[EMAIL PROTECTED]>; Secrets of the Weird <[EMAIL PROTECTED]>