Committing & Updating Files

Anytime you add a new file or change a file, you need to perform a "commit". Committing the file essentially takes the changes that you've made on your local machine and commits them to the CVS server. Prior to doing a commit action, it is considered good practice to perform a CVS Update, which will update your files with any changes that have been made while you were working on your files. In a team-based development environment, this will happen regularly. CVS is intelligent enough to merge changes into your files during the update process. If there are any conflicts, CVS will notify you that there was a conflict that you have to resolve. After you have performed a CVS Update, you can then do a commit of your files by right clicking on your top level folder and selecting CVS Commit.



After selecting CVS Commit, a window will pop up with a list of the files and their status. You also have the ability to insert a comment for this commit action. Comments are very useful - if you are detailed enough, they will help you when you ever have to go back a few days to look at a change that you made. Comments can also be used to store bug numbers for those who have a bug tracking system and the commit that you are doing is to fix a certain bug number. After you have entered your comment and pressed OK, your files will then be committed to CVS. You will notice in your folder that all of your files now have a green box on them indicating that the files are in CVS.

Changing Files

The whole purpose to CVS is to track changes to your files. If you make a change to a file, Tortoise will update the color of the file to let you know that you have to commit the change made. To change a file, simply open it and make the change and then save it. You will notice that the file now has an orange arrow box on it, which indicates that the file has been modified. You should now perform a CVS Update, and then a CVS Commit to update the file in CVS.

Deleting Files

Files change during development, but sometimes they can also be removed if something is deprecated. To remove a file in CVS, right click on the file that you want to remove and under CVS, choose Remove. Tortoise will now remove the file from the directory and place it in the Recycle bin. The file has been removed from your local source code, but you still need to commit that change to CVS by performing a CVS Commit.

Checking out a Module

Once a module is checked into CVS, you can check it out at anytime, and depending on your network configuration, from anywhere. To check out a module, simply right click in a folder and choose the Module to check out. Once you click OK, Tortoise will check out a clean version of your module into the folder you selected.



Checking out a Module or Files by date

At some point during your development, you may need to get an older version of a file or module. To do this, follow the instructions above on checking out a module, and before clicking OK, click the "Revision" tab. The revision tab allows you to check out files by Branch or Tag. This is beyond the scope of this tutorial. For more information on Branching and Tagging files, read the CVS Documentation. You can also choose to check out files by Date by either using the calendar or by typing in a date and time for Tortoise to use.

Installing Tortoise CVS Viewing the history of files
Comments Locked

34 Comments

View All Comments

  • NateS - Sunday, April 17, 2005 - link

    There's a new SCM/version control software from ionForge called Evolution. It gives you easy, encrypted connectivity for collaborating over the web. It's quick to install and relatively intuitive to use. Single-user licenses are free at the ionForge website and multi-user licenses are $550 per license, which is less than comparable alternatives.
  • NateS - Sunday, April 17, 2005 - link

    There's a new SCM/version control software from ionForge called Evolution. It gives you easy, encrypted connectivity for collaborating over the web. It's quick to install and relatively intuitive to use. Single-user licenses are free at the ionForge website and multi-user licenses are $550 per license, which is less than comparable alternatives.
  • DonPMitchell - Wednesday, January 5, 2005 - link

    I'd stay away from CVS, its pretty lame old UNIX software from way back. Perforce is the best you can find, used on some huge professional projects. And if you can get a free version for small projects, then that's perfect.
  • jayoung - Tuesday, January 4, 2005 - link

    I'm having a tremendous headache setting it up. Here's the error I recieve:


    Followed the instructions up to the part where you create a new module
    and I keep getting the same error.

    In C:\DOCUME~1\Joseph\LOCALS~1\Temp\TortoiseCVS make new module temp\:
    "C:\Program Files\TortoiseCVS\cvs.exe" "-q" "-x" "import" "-m" ""
    "testmod" "tcvs-vendor" "tcvs-release"
    CVSROOT=:sspi:Joseph@localhost:2401/cvsroot

    cvs [server aborted]: can't create temporary directory
    C:\temp\cvstemp/cvs-serv2304: Permission denied

    Error, CVS operation failed
  • Pauli - Tuesday, January 4, 2005 - link

    Foxbat121-
    My company has a very large Clearcase installation (400+ developers) with most clients being Windows machines and we are generally pleased with the features and performance. Of course, the first couple of years were hell. The last 3 or 4 years have been trouble free for the most part. I've been using it daily for more that 5 years now and have never experienced a license server problem.
  • Foxbat121 - Tuesday, January 4, 2005 - link

    My Company spent near a million $$ upgraded to ClearCase a few years back. It's a biggest waste of money and bottle neck on productivity. Yes, it does have extensive administrative tools and features. That's why managers all love ClearCase because they are the ones who don't have to write a single line of code. For software engineers, we have to spend half of the day just to synchronize every one's work. Spend probably one hour to make code changes and spend rest of the day try to deliver that code change to the CC so every one else could get the changes next day. It's slow and buggy as hell.

    Yes, it does have Windows Explorer integration. However, if the license server is down for whatever reason, your Explorer (and every one else with CC installed) will have 2-minute delay every time you try to bring up the context menu even though you're not using any of the CC features.

  • Bookie - Monday, January 3, 2005 - link

    you can count me in for another vote for Subversion. My company uses VSS and I agree with everyone else, it sucks. I personally use Subversion for my own stuff and I'm working on convincing my company to swtich. I'd like to see Anandtech make the switch and spread the news.
  • neogodless - Thursday, December 30, 2004 - link

    I got it to work with NO username after some experimentation, but it didn't match the example in the "tutorial". Thanks for the help, anyway!
  • Jason Clark - Thursday, December 30, 2004 - link

    neogodless, if you have difficulties with SSPI, try pserver, it will still auth against the NT user database. SSPI should work though.

    Cheers
  • Sokaku - Thursday, December 30, 2004 - link

    I've used Source Safe, PVCS, CVS, Subversion & ClearCase.

    The strongest of these products is without a doubt Rational ClearCase. But as other mentioned, its also by far the most expensive on all fronts (administration, support, hardware, price).

    ClearCase is integrated into explorer with its view architecture (defining views is not trivial and can cause alot of headackes).

    Subversion is also directly supported by simple integration (tigris) of the explorer. However using the recommended way of handling branches, its very logical and straightforward to use.

    As a pricy consultant I would recommend ClearCase for any big companies with alot of cash.

    As a person with a love for programming, I would recommend subversion to anyone else.

    I would in no way ever spend time on CVS, PVCS or Source Safe ever again.

Log in

Don't have an account? Sign up now