/ acm / sigsoft / cvs workshop / Nov '96

Logging / Annotations / Other Useful Stuff

Getting information about a file:

$ cvs status file
EXAMPLE

Examing the logs on a file:

$ cvs log file
EXAMPLE

Annotations - who did what

$ cvs annotate file
EXAMPLE

Keyword expansion fun

Certain keywords will be automatically expanded in source files: An example:
/* $Id: hello.c,v 1.3 1996/11/15 22:14:05 swetland Exp $
 * $Date: 1996/11/15 22:14:05 $
 * $Author: swetland $
 * $Revision: 1.3 $
 */

main()
{
        printf("Hello World");
}
If you embed this strings in a string constant, the rcs ident command can be used to get the version of an executable. Example, hello.c:
static char *id = "$Id: hello.c,v 1.3 1996/11/15 22:14:05 swetland Exp $";
main()
{
	printf("Hello, World!");
}
Try typing:
$ ident hello
hello:
     $Id: h.c,v 1.3 1996/11/15 22:14:05 swetland Exp $