FreeKB - How to view the status of a file in CVS
How to view the status of a file in CVS

Home > Search > How-to


If you are not familiar with CVS, check out our getting started article. These examples are based on Linux.

Let's say the root directory of your master CVS repository is /var/cvs and the root directory of your local CVS repository (branch) is /home/john.doe/cvs. In your local CVS repository (branch), you can view the status of a particular file. In this example, the status of foo.txt is checked.

Notice in this example that the status is "Up-to-date". This means that the revisions of foo.txt in your local CVS repository is the same as the revision of foo.txt in the master CVS repository. In this example, the master has revision 1.3 and your local has revision 1.3.

~]# cvs status /home/john.doe/cvs/foo.txt 
=====================================================================
File: foo.txt  Status: Up-to-date

    Working revision      1.3  Mon Jan 01 12:34:56 2017
    Repository revisions: 1.3  /var/cvs/foo.txt
    Sticky Tag:          (none)
    Sticky Date:         (none)
    Sticky Options:      (none)

 

On the other hand, notice in this example that status has "Needs Patch" and your working revision is 1.2 where as the repository revision is 1.3. This means you do not have the latest revision in your local CVS repository. You can check out foo.txt from the master so that you are working with the latest revision of foo.txt.

~]# cvs status /home/john.doe/cvs/foo.txt 
=====================================================================
File: foo.txt  Status: Needs Patch

    Working revision      1.2  Mon Jan 01 12:34:56 2017
    Repository revisions: 1.3  /var/cvs/foo.txt
    Sticky Tag:          (none)
    Sticky Date:         (none)
    Sticky Options:      (none)

 

The log command can be used to view each revision, and the summary of the changes made during each revision.

~]# cvs log <file name>
total revisions: 2; selected revisions: 2
description:
-----------------------------
revision 1.2
date: 2018/02/28 07:50:56; author: Wendy; state: Exp; lines: +131 -188
Summary of next revision
-----------------------------
revision 1.1
date: 2018/02/15 05:06:27; author: Jeremy; state: Exp;
Summary of first revision
======================================================

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter becb5 in the box below so that we can be sure you are a human.




Comments