WinCVS

CVS Client for Microsoft Windows 95/98/nt/2000

WORKING WITH WINCVS

 



WinCVS Introduction

Installing WinCVS

Installing CVS Integration for Visual Studio

Working with CVS from Visual Studio

CVS Home Page

For Administrators: Setting up CVS as a Server
under Linux

 

A Quick Overview of what it's like to work with WinCVS and a CVS Server.

WinCVS Workflow

Here are the steps to successful participation in a project managed using WinCVS:

    Query the CVS server to find out which modules are available in the prepository (no, you can't browse them the way you could in SourceSafe). Usually a module represents a project, but it doesn't have to. A module can be just a component shared between projects, like our 'COMMON' directory was on the last batch of games.

    Perform a checkout on each module you're interested in. This will create a directory in your sandbox for each module you check out.

    Ask CVS to do an update for your sandbox. Every directory it recognizes as conforming to one in the repository will be updated with whatever files you're missing. If you're missing all the files, update will get all the files.

    When it's time to check in your work, don't look for the "check-in" button. There isn't one. Instead, "commit" your changes to the repository.

    SPECIAL NOTE: If somebody else has committed changes to the same files you were working on, CVS won't let you commit yourchanges until you've merged what's in the repository with your copy of the code. Do this by requesting an update on your source files. Once your code has been merged with the code from the repository and you've had a chance to make sure it still works, then you'll be allowed to commit your changes.

    You may wish, at certain times, to "branch" one or more source files off in a different direction for a while so that you can try out an idea or perform some complex modification without hurting the rest of the project.

    Lather, rinse, repeat.

    For all the answers, consult the CVS-1.10 help in your WinCVS console, or you can refer to the CVS Support page at Cyclic Systems web site. There you will find a number of introductory texts written for the new user of CVS.

Common Terms

WinCVS can work the way you want to, but it doesn't use the same terminology SourceSafe does.
Here's a quick glossary of the most important terms.

    Checkout

    Translate this as 'get a copy of'. CVS (and therefore WinCVS) assumes that many programmers will be working on the same source files. To do a checkout, first set the WinCVS browser so that you've selected the top level directory of your 'sandbox'. Then select Create/Checkout from the menu bar. Next, select Modify/Update Selection, and WinCVS will compare your 'sandbox' to the modules on the server and update anything that's missing (the first time you do this, that would be everything). Be prepared for it to take a little time. Modules have to be compared file by file, even if your local copy is empty to start with.

    Update

    Doing this for a module will refresh everything that's changed since the last time you asked for an update. Merging is done automatically. In case of a merge conflict between code you might have modified and the code currently on the server, WinCVS will let you know that there's some hand-merging to be done. It does not presume to resolve the conflicts itself.

    Watch

    If you want to be notified each time a particular file is modified, set a watch on it. When developers get watched files during an update, they'll be marked read-only. You must use the edit command to unlock it. This has the side-effect of notifying everyone having a watch on that file that it is being modified. This is close to the process of checking files in and out from SourceSafe, except that SourceSafe doesn't notify anyone when you edit files. To discard changes to a file, you would use the unedit command.

    Edit

    As mentioned above, this gets you permission to edit a "watched" source file or files.

    Unedit

    As mentioned above, this discards changes you made to an "edited", "watched" source file or files.

    Commit

    When it's time to check in your work, don't look for the "check-in" button. There isn't one. Instead, "commit" your changes to the repository.

    SPECIAL NOTE: If somebody else has committed changes to the same files you were working on, CVS won't let you commit yourchanges until you've merged what's in the repository with your copy of the code. Do this by requesting an update on your source files. Once your code has been merged with the code from the repository and you've had a chance to make sure it still works, then you'll be allowed to commit your changes.

    Branch

    You may wish, at certain times, to "branch" one or more source files off in a different direction for a while so that you can try out an idea or perform some complex modification without hurting the rest of the project. Branches can be merged back into the main project at any time by merging what's on the server's repository with your branched source file(s), then committing them to the repository again.