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 498091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:50:39+00:00 2026-05-13T05:50:39+00:00

In CVS, my working copy (WC) is on a certain branch (which we’ll call

  • 0

In CVS, my working copy (WC) is on a certain branch (which we’ll call “foo”). There have been other changes checked into foo by another dev. I want to do a diff between my WC and the upstream state of foo. Normally, when working in the trunk (HEAD), I just do a cvs diff, and that’s fine. But for some reason when doing a plain cvs diff in the branch, the diff is empty. When I try to use “cvs diff -r foo”, the diff shows up, but it is inverted — upstream additions are shown with minuses, and upstream removals are shown with pluses.

How can I either: (1) get CVS to diff “the other way” (plus for upstream additions), or (2) invert a patch (in general)?

  • 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-13T05:50:39+00:00Added an answer on May 13, 2026 at 5:50 am

    If the principal purpose of this is to check “what’s up” in the central repo, I suggest you get yourselves a functional CVS viewer/browser/web thingy where you can browse and see the latest changes before updating. But assuming all you have is command-line CVS, I will attempt to give you a solution anyway 🙂

    So, what you have here is a branch foo that went from A -> B, where B is the state of the branch (on the server) after the other developer’s checkin, and A is the state you last updated your working copy to.

    When just doing a plain cvs diff in this situation, you’ll see your local changes compared to A since A is what you have checked out. The local CVS state will show that each file comes from the A revision on the foo branch, and when diffing your CVS client will download that revision from the server. In your case I’m guessing you have no local changes since your cvs diff is empty.

    Then, when you do a cvs diff -r foo you’re diffing your local A (or A+changes) against the server’s foo (which currently is at B) – and the changes required to get from the server’s B to your A+changes is exactly the opposite of the other developer’s check-in, plus your own local changes.

    Now, if you really really want to know how B (or tip-of-foo) compares to A (the pristine version of whatever you currently have checked out), what I think you have to do is set a tag on your working copy, then diff that tag against the state of the branch. Something like this:

    cvs tag pistos_temp1
    cvs diff -r pistos_temp1 -r foo
    # And clean up by deleting the tag afterwards:
    cvs tag -d pistos_temp1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, I have migrated my CVS repository into SVN repository. I checked out this
How to query CVS for what have I committed to module M branch B
I have converted a CVS repository to Mercurial, but the carriage returns are converted
I need a way to figure out what files were added/removed/modified in the CVS
Everything was working great with the build. Then this started popping up after the
I use CEDET (latest CVS) with several moderately large projects (a few hundred kLOCs
So I'm impoting a 80000+ lines .cvs files to a MySQL database, using Import
I just converted a 10G CVS repo (about 120 modules) in one single git
TFS version is 2010. CVS version is 1.11.17.
I am in the process of figuring out how to get Eclipse (Windows 7)

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.