Basics tasks with WinCVS
Written by scmGalaxy Admin   

File-oriented tasks

  • Editing files in your sandbox
  • Committing changes to files
  • Adding new files to a project
  • Deleting files from a project


Directory-oriented tasks

  • Adding directories to a project
  • Deleting directories from a project


Other daily tasks

  • Releasing a project

The first thing to do when starting on a project
Any time you start working on a project and you have an old copy of the repository on your system (which is 99% of the time after the first checkout), the first thing you should do is to update your sandbox.

Updating the sandbox is easy. Just click the project folder you want to update, then right-click, and choose "Update selection" from the popup menu:


This option brings up a dialog like this: 

 

I always make sure I choose to create missing directories that exist in the repository to make sure I get everything that is new in the repository.

After following this simple step to get started, you're ready to work in your sandbox.

One other note: I do frequent updates throughout the day when I'm working on a project with other users. This helps keep conflicts down, and if there is a conflict with a change someone else has made, I catch it early.

Editing files 

Opening a file to edit it is pretty easy. Depending on your Windows configuration you can either double-click the file to use the default file association, or right-click the file and choose the "View with" menu option.  

 

 Committing your changes


Step 1:

In Step 1, just select the file(s) that you want to send back to the repository, right-click the file name, and choose "Commit selection".

 

Step 2:

In Step 2, you should provide a brief description of the changes you've made to the file(s).

Note that it is usually better to describe more "why" the change was made rather than exactly "what" change was made. With the "diff" facility in WinCVS, you can always show a difference between two versions of a file ... but you can't always tell why someone did what they did. That's where the description (log message) comes in.

 

 Releasing a project

Some times you *think* you've committed all of your changed or newly-added files back into the CVS repository, but you really haven't. So, how can you tell which files have been changed in your sandbox but not committed back into the CVS repository? With the "cvs release" command.

Choose "Admin | Command Line" from the WinCVS menus and you'll see this:

 

Change the text in the textarea to read as shown below, and click the checkbox to specify the directory just above the project that you want to release, and your dialog will look like this:


 Then click "OK". You should then see a dialog like this:

 

At this prompt I *always* click "No", because I don't really want to release the project, I just want to see if I have any altered files. Fortunately in this example I don't have any altered files in my sandbox -- i.e., there are no files in my sandbox that are different than the files in the repository -- so I can be confident that I have committed all of my changes back to the repository. 


 

Our valuable member scmGalaxy Admin has been with us since Saturday, 15 November 2008.

Show Other Articles Of This Author

     
    
Home