Status Command
The status command shows the status of a working directory or a file in the working directory. To find the status of a file in a working directory, the syntax of the status command is as follows:$ cvs status filenameSuppose, there is a file named, test.txt in the working directory and you want to know it's status. The CVS command and the result for the same will be:
$ cvs status test.txt =========================================== File: test.txt Status: Up-to-date Working revision: 1.4 2009-03-01 21:56:13 -0500 Repository revision: 1.4 /home/perlproject/test.txt,v Commit Identifier: 06lkV5xhtSH6apEt Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) $The above output is quite clear. The first line contains the name of the file and status indicator. The status indicator can be either of the following: * Up-to-date
The file is identical with the latest revision in the repository for the branch in use.
* Locally Modified
You have edited the file, and not yet committed your changes.
* Locally Added
You have added the file with add command, and not yet committed your changes.
* Locally Removed
You have removed the file with remove, and not yet committed your changes.
* Needs Checkout
Someone else has committed a newer revision to the repository. The name is misleading; you will ordinarily use update rather than checkout to get that newer revision.
* Needs Patch
Like Needs Checkout, but the CVS server will send a patch rather than the entire file. Sending a patch or sending an entire file accomplishes the same thing.
* Needs Merge
Someone else has committed a newer revision to the repository, and you have also made modifications to the file.
* Unresolved Conflict
This is like Locally Modified, except that a previous update command gave a conflict. You need to resolve the conflict.
* Unknown
CVS doesn't know anything about this file. For example, you have created a new file and have not run add.
Working revision lists the revision of the working file (which is the repository revision at the time you last updated the file). Repository revision lists the current repository revision and the full path to the history information on the server.
Sticky tag, date, and options show the sticky options for the working file. You can reset them using cvs update -A.
Have a look at the command and the output given below:
$ cvs status cvs status: Examining . =========================================== File: test.txt Status: Up-to-date Working revision: 1.4 2009-03-01 21:56:13 -0500 Repository revision: 1.4 /home/perlproject/test.txt,v Commit Identifier: 06lkV5xhtSH6apEt Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) =========================================== File: try Status: Up-to-date Working revision: 1.4 2009-03-03 14:18:19 -0500 Repository revision: 1.4 /home/perlproject/try,v Commit Identifier: THI5Wpk5kqu4zCEt Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) $The status of all the files in the directory is displayed if you do not specify the filename.
Options of the status command
1) -l
Do not consider the sub directories.
2) –v
The option -v stands for Verbose. It displays additional information about each file including all symbolic tags along with revision numbers they correspond to. It does not alter the files in any way. For example, to view the status of the test.txt file, the command is:
$ cvs status –v test.txt3) -R
This option will display the status of the directory as well as the sub-directories within it.
