[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: CVS Diff Problem
From: |
Jim.Hyslop |
Subject: |
RE: CVS Diff Problem |
Date: |
Wed, 28 Jul 2004 15:39:09 -0400 |
pjois@ualberta.ca wrote:
> Hi i'm having a problem with CVS that I think should be pretty
> straightforward. I have a local copy of a file, say file.c version
> 1.1.1.1. Someone else also has a copy somewhere else, makes a change
> and commits it as 1.2. Now when I go back to my local copy and do a
> cvs diff, it shows nothing. When I do a cvs status, it says "Needs
> Patch". Am I understanding the function of cvs diff incorrectly?
Yes.
'cvs diff' without any further arguments tells CVS "What changes have I made
to my working copy?" Since you have not made any changes, there is nothing
to report.
If you want to ask CVS "What has changed in the repository since I last
updated my source?" you can run the command:
cvs -nq update
This will display a list of files that are locally modified, or which need
to be updated from the repository. The -n flag tells CVS not to actually do
the update, and the -q flag suppresses the "Processing [directory name]..."
messages.
Now, a couple of other items:
> cvs import -m "Test" test vendor start
Only use 'cvs import' to import a third-party source tree. Don't use it to
initially populate your repository of your own files.
Backing up a bit here, you said:
> ... I have a local copy of a file, say file.c version
> 1.1.1.1. Someone else also has a copy somewhere else, makes a change
> and commits it as 1.2. Now when I go back to my local copy and do a
Did you just type in random CVS revisions, or are the revisions you
mentioned here the actual revisions causing you problems? If they are the
actual revisions, then even a 'cvs -nq up' will not show anything, because
the other user checked in his/her changes on a different branch.
--
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (http://www.leitch.com)
Columnist, C/C++ Users Journal (http://www.cuj.com/experts)