Disclaimer: This tutorial does not go into detail about what a repository
is. Pleas visit Geoff
Berry's CVS page for more information.
CVS
command reference
CVS in a few simple steps
Create an account on sourceforge.cs.duke.edu
(you only have to do this once)
Even though it says that an email will be
sent out confirming your account, it won't happen. Your account will be active
right away.
Setting up a project (10 steps)
1. Log in - this
will bring you to your start page with all your projects and your bug reports.
2.
Go to Register New Project on the left column of your main page.
3.
Follow the instructions on the page (only 3 steps required: basic information,
full and Unix name, confirmation). As of right now you are the Admin for this
project.
4. Go to your main page and click on the project you
just created (listed under 'my projects' at the bottom right side). This will
take you to the project main page.
5. Click on 'Project Admin'
on the left column. Go to 'Edit Trove Categorization' and select the three
locations for this project. You have to add all members of your group to this
project. You can do this on the right side of the Admin page under "Group
Members".
IMPORTANT ... before
continuing please make sure you updated your .cshrc (or profile) file as
described under
CVS on ACPUB or CS or
CVS on Cygwin
6.
Open your shell (xterm/eterm/cygwin etc) and go to your course directory.
7.
Create a directory for this project and go into it or go to the directory where
all the files for this project are located.
IMPORTANT
... for the next step make sure this directory is either empty or clean. By
clean we mean no executables, backup, .o or .class files. Only files that
contain code should be included (That includes the Makefile and the README
file).
8. Enter the following command to upload all files to
the server for the first time:
cvs import modulename groupname releasename |
(This only has to be done once!) modulename = Unix name of the project,
releasename = can be anything really ... identifies the files on the server.
9.
Go up one directory and enter:
cvs checkout modulename |
This has to be done by every group member. You can now delete the original directory since it is not needed any more.
10. Done!
Go into your .cshrc (ACPUB) or .my-cshrc (CS) file located in your home directory and add the following lines to it:
setenv CVS_RSH ssh setenv CVSROOT your_cvs_login@sourceforge.cs.duke.edu:/cvsroot/modulename |
modulename = Unix name of the project.
Go into your profile file located in ../Cygwin/etc/ and add the following lines
CVS_RSH="ssh"
CVSROOT="your_cvs_login@sourceforge.cs.duke.edu:/cvsroot/modulename" |
modulename = Unix name of the project.
CVS commands most commonly used
ones
cvs import modulename groupname releasename | The initial uploading of the files onto the server. This has to be done only once for every project. |
cvs checkout modulename | Downloads a clean version (latest version) from the server into a directory with the name of the project. |
cvs up | Checks for differences between your local files and the files on the server. If differences exist it will merge the files. The only thing you have to watch out for is a 'C' in front of the merged files. This means there is a conflict, which cvs can't resolve. You will have to go into the file and edit the part cvs can't understand. |
cvs commit | Uploads the new files to the server. It is recommended to do a cvs up every time before you commit. If you commit without checking first you might overwrite files changed by your partners. |
cvs add filename | Adds a file to cvs. The file will be uploaded the next time you commit. You can use wildcards (i.e. *.java), but this might lead to undesired files being uploaded to the server. |
cvs remove filename | Removes a file from cvs. The file has to be removed from your local directory first. Wildcards are not supported! |
Fore more commands please visit the man page online or on the shell by typing man cvs
Written by Marco Till Brenner mtb5@duke.edu