Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6685439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:03:28+00:00 2026-05-26T05:03:28+00:00

I modified line 494 of a certain file, and use cvs diff -u4 to

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:03:28+00:00Added an answer on May 26, 2026 at 5:03 am

    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:

    The format of the range information line is as follows:

    @@ -l,s +l,s @@
    

    The hunk range information contains two hunk ranges. The range for the
    hunk of the original file is preceded by a minus symbol, and the range
    for the new file is preceded by a plus symbol. Each hunk range is of
    the format l,s where l is the starting line number and s is the number
    of lines the change hunk applies to for each respective file.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My .gitignore file has the following line vendor/ I have modified a file inside
In my line of business we have Products. These products can be modified by
I have the following line in my .gitignore file: var/www/docs/.backroom/billing_info/inv.pl but when I type
I have this line: <xsl:when test=document('foo.xml')/field_config/field_rename/field[@old_name = $name]/@new_name> foo.xml: <field_config> <field_rename> <field old_name=Modified new_name=modification/>
I have a line series chart called lineSeries1. I would like that chart to
In my codebase; I see line <123> is in a specific file; and i'd
I have modified the example found here to use two io channels. None of
I have been trying to use HG convert to migrate a local CVS repository
See below the solid line for my original question. I have a folder in
If I have modified several lines of a versioned file, is it possible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.