1. Using CVS under Linux ------------------------ 1.1 If you are on the EECS/ENGR files system: ---------------------------------------- 1. In your shell, set the environment variable CVSROOT to /nfs/phantom/u7/wonglab/cvs For example, if you are using tcsh, you would type in setenv CVSROOT /nfs/phantom/u7/wonglab/cvs (or better yet, add it to your startup files like .cshrc) 1.1.1 Importing a module ---------------------- 1. Go to the directory you want to import. Type in cvs import -m "your message" directory vendortag releasetag The last two arguments (ie. vendortag releasetag) won't currently be used but you need to include them anyway. The 3rd to last argument (ie. directory) is relative to CVSROOT. For example, if you want to import research/project1, and CVSROOT is /nfs/phantom/u7/wonglab/cvs, then you would type in: cvs import -m "your message" research/project1 vendortag releasetag which would put your directory to /nfs/phantom/u7/wonglab/cvs/research/project1. Remember that once you've imported your files, they are not yet "known" to CVS in your local directory. You need to rename your local directory to something else and then do a checkout of the corresponding directory from CVS. See below. 1.1.2 Checking out files ---------------------- 0. Create a local directory for your working directory of a repository module. I'll refer to this directory as . Go to . 1. Type in cvs checkout -d . You should see some files and directories getting checked out. * Checking out the stratagus directory from the repository: Since the CVS only includes files that need version control, all the files needed to compile and run Stratagus (such as graphics, sounds, etc.) are not in the repository. As far as I know, CVS doesn't allow you to checkout with replacement so here's an alternative way of putting it all together: 1. Download Stratagus, and install it in . 2. Navigate to ; make sure it is empty. 3. Run cvs checkout -d . stratagus # Gets the latest files from the CVS repository cp -r --reply=no /* . # Copies the other files over from the Stratagus download rm -fr # Removes the Stratagus download 1.1.3 Getting the latest source code ------------------------------------ 1. Type in cvs update in your . 1.1.4 Committing your modified source code ------------------------------------------ 1. Type in cvs commit in . 1.2 If you are not on the EECS/ENGR file system: ------------------------------------------- I haven't figured this out yet. It will probably involve: setenv CSH_RSH="ssh" setenv CVSROOT=":ext:your-username@jasper01.eecs.oregonstate.edu:/nfs/phantom/u7/wonglab/cvs" 2. Using CVS under Windows -------------------------- (Note: WinCVS can be annoying. I recommend using TortoiseCVS instead but I haven't had time to update this document). 1. Download and install the latest recommended build from http://www.wincvs.org/download.html 2. Create a CVS directory. I'll call it . Things to be careful of when using WinCVS: * When the "view" at the left of the WinCVS window is in a directory, that directory is considered to be in use. You won't be able to delete it until you get out of that directory in the CVS directory tree view. * Remember to reload the view whenever the directory changes. It does NOT happen automatically in WinCVS. * Pay careful attention to / and \ in path names because we are mixing Linux and Windows path names below. 2.1 Importing a Directory to CVS -------------------------------- 0. On the left window of WinCVS (the one with the view of your directory tree) click on the folder you want to import. 1. Goto Remote -> Import Module 2. Select the file extensions you want to import. You will need to hit "Edit" on the file extensions you want to change. Once you're happy with the file extensions that will be imported, hit OK. 3.On the Import Settings screen, do the following: a) In the Repository path, type in the path you want to import your directory into. Everything is relative to the CVS root, which is /nfs/phantom/u7/wonglab/cvs. For example, if you want to import an include directory into /nfs/phantom/u7/wonglab/cvs/stratagus/include, type in stratagus/include into the Repository path. b) Check the CVSROOT checkbox. Enter :ssh:your-username@nome.eecs.oregonstate.edu:/nfs/phantom/u7/wonglab/cvs c) If you have a log message, enter it in the log message box. When you are done, hit OK. 4. You will be prompted to enter a home directory. This isn't too important, so just create a home directory like C:\home. 5. You will be prompted for your password. Enter it. 6. You should see a list of files being imported. Remember that once you've imported your files, they are not yet "known" to CVS in your local directory. You need to rename your local directory to something else and then do a checkout of the corresponding directory from CVS. See below. 2.2 Checkout a Module from CVS ------------------------------ 1. Goto Remote -> Checkout Module 2. On the Checkout Settings screen do the following: a. Enter the module name and path on the server. This is relative to the CVSROOT ie. it's relative to /nfs/phantom/u7/wonglab/cvs. For example,if you want to checkout /nfs/phantom/u7/wonglab/cvs/research/project1, you would enter research/project1 here. b. Leave the "Check out into directory" checkbox unchecked. c. For "Local folder to checkout to:" put in: C:\\. Note that this will checkout the directory structure specified by "Module name and path on server". This means if you put in research/project1 for "Module name and path on server", it will checkout (and create the directory structure if it doesn't exist) C:\\research\project1 d. Click OK. Enter your password. You should see files being checked out. 3. PS: If you make a mistake, you can always delete the checked-out files and recheckout again. * Checking out the stratagus directory from the repository: Since the CVS only includes files that need version control, all the files needed to compile and run Sratagus (such as graphics, sounds, etc.) are not in the repository. Since WinCVS does not support checkout with replacement, here's one way of putting it all together: 1. Download Stratagus, and install it in . 2. Navigate to ; make sure it is empty. 3. Checkout stratagus to . 4. Copy /* to , and click No (to All) for replacement. 5. Delete . 2.3 Commit code to CVS ----------------------- 1. You can commit files or entire directories (including their subdirectories) to CVS by right clicking on the directory either in the directory tree window or in the window that lists the directories and files. Select "Commit" from the menu that pops up after you right-click. 2.4 Update code from CVS ------------------------ 1. Just as above, right click either the file or the directory and select "Update".