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

  • Sokaku - Tuesday, December 28, 2004 - link

    I agree, cvs is replaced by subversion.
  • cosmotic - Tuesday, December 28, 2004 - link

    heh, I was going to say the same thing. CVS kinda sucks.
  • Cat - Tuesday, December 28, 2004 - link

    What, no Subversion?
  • kishore.kumar - Friday, September 15, 2017 - link

    I have set my cvsnt and have installed tortoise cvs client, now after running cvsnt server I am unable to create new module through tortoise for the folder containing a doc file in my D-drive. Please share me the steps to set new module as I am finding error as.

    cvs [import aborted]: the :sspi: access method is not available on this system

Log in

Don't have an account? Sign up now