Chapter 28 . Programming Tools and (Best web site) Utilities 743
Chapter 28 . Programming Tools and Utilities 743 When you check in a modified file, CVS opens an editor session to enable you to enter a log message that describes the changes you made. The editor used is the editor defined in the $EDITOR environment variable or compiled-in default (usually vi) if $EDITOR is undefined. This example did not use the -d option because the $CVSROOT environment variable is set. To check out a specific version, or revision, of a file, use the -r option following the checkout or co command, followed by a revision number. For example, to check out revision 1.1 of the showit.c file, use the following command: $ cvs checkout -r 1.1 newhello/showit.c U newhello/showit.c To see the differences between two revisions, use the diff command, using the -r m.n, where m.n indicates the revision number you want to check. If you specify -r only once, the indicated version will be diffed against the working file. If you specify -r twice, the two versions will be diffed against each other. The following example compares revision 1.2 of showit.c to the current working revision (the revision that is currently in the working directory): $ cvs diff -r 1.2 newhello/showit.c Index: newhello/showit.c =================================================================== RCS file: /space/cvs/newhello/showit.c,v retrieving revision 1.2 retrieving revision 1.3 diff -r1.2 -r1.3 9,10c9,10 < char msg_hi[] = { Hi there, programmer!n }; < char msg_bye[] = { Goodbye, programmer!n }; --- > char msg_hi[] = { Hi there, programmer! }; > char msg_bye[] = { Goodbye, programmer! }; 12c12 < printf( %s , msg_hi); --- > printf( %sn , msg_hi); The diff output is easier to understand than you might expect. Lines that begin with < appear in the first file (revision 1.2 of showit.c) but not in the second (revision 1.3 of showit.c. Similarly, lines beginning with > appear in the second file but not in the first. Each section of diff output begins with an alphanumeric sequence such as 9,10c9,10 or 12c12. The numeric values indicate the lines in the first and second files to which an operation must be applied to get the second file from the first. The operation to perform, such as inserting, deleting, or changing lines, is specified by the alphabetic character. So, for example, the sequence 9,10c9,10 means that to create the second file from the first you have to change (c) lines 9 and 10 of the first file to lines 9 and 10 of the second file.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.