Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
Support information for CVS
CVS is concurrent version control system. It maintains file consistency when multiple users are working on the project at same time. It even enables to users to modify same files at the same time. It is essential that everyone uses CVS when working with Teddy.
When you use CVS, everyone has his or her own working copy of all files. Additionally there is a single repository, which maintains official version of files. The repository is maintained and located in Sourceforge. There are few important basic operations that you need.
Two most important operations are update and commit. Commit command compares your files to the reposity and sends the changes you have made to the repository. Update commands gets the latest versions of files from the reposity to your working copy. The changes that others have committed are now in your working copy.
You may wonder: If I make some changes and use update, will I lose my changes? No. Good. Wait. What if someone else has also changed the file, and committed changes before I have? Still no problems; when you make commit, CVS may tries to merge your changes. Sometimes it is not sure how this should be done, and you may have to manually decide what to do; CVS commit will abort and ask you to solve the conflict. Just open the file and edit it so that it will build again. You will notice that CVS has included both versions of parts that you both have changed.
You will have to manually add each new files to the CVS. Same applies to remove. Note that CVS interpretes files as text by default, and expects that it can make some changes to the file. This means that binary files are effectively corrupted by CVS unless you explicitly tell CVS that it should leavy this file exactly as it is given. To do this, add files using -kb options.
It would be a good convention to always update before commit, and never do commit until you are sure that it builds without any errors - at least on your favorite platform.
Instructions how to check out your working copy are on separate page Getting Teddy to your machine.
Once you have made some modifications and you thing it would be time to commit your changes, do the following:
Notice: On Finnish/Swedish keyboard layout, the `-key is on the left side of backspace-key.
Congratulations, the CVS is now up to date with your working copy :)
- Clean up everything by make clean
- Retry building everything. Fix any problems.
- Clean up again by make clean
- cd to the directory
- cvs -n update >../log 2>../log2
This will compare your working copy with the CVS repository and write difference reports. It will not actually change any files in anywhere.
- Examine ../log and ../log2
- If there are any files marked with U,
you have deleted that file from your working copy on purpose or by accident - or that is a new file in the CVS added by someone else. Make a list of those files which you know you have deleted on purpose and save it as ../rmlist. Then execute the command
This will mark old files to be removed from the CVS reposity.
- cvs remove -f `cat ../rmlist`
- If there are any files marked with ?,
you have created a new file which neeeds to be added to CVS - or you have not cleaned up all files (or the distclean.sh scripts need updating..). First clean up by removing those files you know which are result of building. Then make a list of those files you have added on purpose. Usually you can use a single list when you work only with source files, but binary files must be added separately. Thus, if you have any binary files, put them to another liest. Save new text-only files list to ../addlist and new binary files list to ../addkblist. Then execute the command
If you do not have either of the list, do not exacuta that command. These will mark new files to be added to the CVS repository.
- cvs add `cat ../addlist`
- cvs add -kb `cat ../addkblist`
- Again do cvs -n update >../log 2>../log2 and examine the logs. If there are no longer ? and U marked files, you can proceed, otherwise you must repeat the previous step.
- cvs update
This will indeed bring any new files from the CVS repository to your working copy.
- Optional: retry building and redo above steps
- cvs commit -m "a brief description what you did to the sources"
This will indeed upload your working copy to the CVS repository. That is, if you had no problems. If you get a list of merge conflicts, open those files to editor, examine, and make up a new version which compiles and builds. Once all conflicts are solved, cleanup and retry the commit command.
- Once the commit is passed, do
To make sure your working copy are actually in sync. If you get reports of ? or U files, step back to resolve them.