This section assumes that that you've already checked out a project from a CVS repository and you're ready to start working on it. This section is broken down into the sub-sections:
The first thing to do
- The first thing you should do when you start on a project
- Editing files in your sandbox
- Committing changes to files
- Adding new files to a project
- Deleting files from a project
- Adding directories to a project
- Deleting directories from a project
Other daily tasks
WinCVS - 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.
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.
After you've made changes to the file (which is still just in your sandbox) and tested it as necessary, you're ready to check the file back into the repository. This process is known as committing your changes, and is discussed in the next section.
Committing your changes to one or more files is a simple two-step process.
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".
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.
When you press "OK", the change and the comment will be sent back to the repository. If there are no conflicts, and you have the proper permissions, your file will be checked back into the repository, and the file version will be incremented.
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.
help support my writing