I modified line 494 of a certain file, and use cvs diff -u4 to see what I have modified, cvs outputs something like :
@@ -490,9 +490,9 @@
if (!(hPtr->hStatus & (HOST_STAT_UNAVAIL | HOST_STAT_UNLICENSED |
HOST_STAT_UNREACH))){
printf(" %s:\n",
_i18n_msg_get(ls_catd,NL_SETN,1612, "CURRENT LOAD USED FOR SCHEDULING")); /* catgets 1612 */
- prtLoad(hPtr, lsInfo);
+ prtLoad(hPtr, lsInfo,bhostParams);
if (lsbSharedResConfigured_) {
/* there are share resources */
retVal = makeShareFields(hPtr->host, lsInfo, &nameTable,
I didn’t understand what the first line “@@ -490,9 +490,9 @@” mean, I did modify line 494, but why CVS writes 490 instead? Could anyone tell me what does “@@ -490,9 +490,9 @@” mean?
The “u” gives you a unified diff and the “4” give you 4 lines of context on either side. From the WP entry I just linked:
So basically the number isn’t the line that was changed. It’s the start of the range being displayed in that hunk. Using your example, the hunk starts at line 490 and 9 lines were in the range. The reason the range covers 9 lines is because of the one line you changed and the four lines of context on either side.
Note that your example seems to have some newlines stripped. I would recommend you fix it so it is clear for other people.