How do I edit pages in a group with the CVS Authoring option?
Based on text by John Reekie from the GSRC FAQ, see the CHESS Softdevel CVS FAQ
Getting started quickly
Many of the workgroups have a CVS Repository associated with them.The idea behind CVS is that CVS copies a version of a source repository on source.eecs
to your local machine. The cvs
commands are run on your local machine, the only reason to log on to source.eecs.berkeley.edu
is to change your password (using the passwd
command or to set up using CVS without typing your password each time?
To update the pages, do the following
- Request a CVS account. Note that your login on source.eecs.berkeley.edu may be different than your login on the website. If you have a UCB EECS account, then your login on source will be the same as your UCB EECS login. If your username on source is different than your local account, then in the commands below you can use
username@source.eecs.berkeley.edu
instead ofsource.eecs.berkeley.edu
, for example,elvis@source.eecs.berkeley.edu
- When you get email back notifying you that your account on source is created, use
ssh
to log in to source.eecs.berkeley.edu and runpasswd
to change your password. - Install CVS and SSH. If you are using Windows, try TortoiseCVS,
- If you are using the command line, be sure that the
CVS_RSH
environment variable is set tossh
. - To check out the CVS repository associated with a workgroup, you need to know where the repository is located. All the repositories for the CHESS, E3S, Embedded and TRUST sites are on
source.eecs.berkeley.edu
.Website Repository CHESS :ext:source.eecs.berkeley.edu:/home/cvs_chess
E3S :ext:source.eecs.berkeley.edu:/home/cvs_e3scenter
Embedded :ext:source.eecs.berkeley.edu:/home/cvs_embedded
iCyPhy :ext:source.eecs.berkeley.edu:/home/cvs_icyphy
TerraSwarm :ext:source.eecs.berkeley.edu:/home/cvs_terraswarm
TRUST :ext:source.eecs.berkeley.edu:/home/cvs_trust
- If you are using a cvs command line client, then set the
CVS_RSH
environment variable tossh
. So, for example to check out thefoo
website, on CHESS, the command lines would beexport CVS_RSH=ssh cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_chess co foo
Or, if your login on source.eecs.berkeley.edu waselvis
, the command lines would be:export CVS_RSH=ssh cvs -d :ext:elvis@source.eecs.berkeley.edu:/home/cvs_chess co foo
- Make your changes to your local copy of the repository.
- Commit your changes by providing a useful message:
cd foo cvs commit -m "message describing your changes"
- Go to the website and click on "CVS Update" at the bottom of the page.
Detailed instructions about Checking Out a Repository
Concurrent Version System (CVS) is a version control system that allows multiple users to edit the same source tree. We use CVS to manage the content of group web pages.
Subversion (SVN) is newer than CVS and is used to manage some software packages. Your Unix account on source.eecs.berkeley.edu can be used with both CVS and SVN repositories.
Bear in mind that CVS authoring is generally useful for software projects, in which case we assume that you know the basics of CVS and can use SSH. For further information about CVS, see the CHESS Softdevel CVS FAQ
- If you are a group administrator of a website workgroup, check that your group has CVS authoring turned on by going to your group pages and then clicking on the
Admin
link and thenConfigure Group
link and verifying thatCVS Module
andCVS Checkin
are selected.
If these two choices are not selected, then select them and hit theChange Group Configuration
button at the bottom. This will send email to webmaster, who will then set up your cvs repository and send email back to you. While you are waiting, you can proceed with the steps below. - If you don't yet have a CVS account on
source.eecs.berkeley.edu
, get one. You can request a CVS account. - If ssh and cvs are not yet installed, then install the SSH client and CVS
- For Unix, download from
http://www.openssh.com/
Build and install. Note that you need not install the server side, you will only be logging out of your machine, not logging into your local machine.
Download, build and install CVS. To download CVS, see:http://www.nongnu.org/cvs/
- For Mac OS X, Install Xcode from Apple, which includes gcc and other tools. Xcode is a 1 GB (!) download, and might not be required. Or, find a CVS Mac OS X application.
- For Windows, you can use TortoiseCVS or download cvs and OpenSSH as part of Cygwin.
Using TortoiseCVS
- Download TortoiseCVS
- You may be prompted for a reboot. If you are brave, you can skip the reboot by using the Windows Task Manager to kill the
explorer
proces and then use Task Manager File -> New Task to start upexplorer
. - Go to the directory where you want to check out the repository, right click and select
CVS Checkout
- Make these changes to the dialog:
- Protocol:
Secure shell(:ssh:)
Note: we used to useSecure shell(:ext:)
. If :ssh: does not work, try :ext:- Server:
source.eecs.berkeley.edu
- Repository folder:
- The repository folder varies depending on the website upon which the workgroup resides.
Website Repository Folder CHESS /home/cvs_chess
E3S /home/cvs_e3scenter
Embedded /home/cvs_embedded
iCyPhy /home/cvs_icyphy
TerraSwarm /home/cvs_terraswarm
TRUST /home/cvs_trust
- User name:
- Your account name on source.eecs.berkeley.edu, which may be different than your website account name
- Module
- The name of the workgroup
When you hit OK, you will be prompted for your password twice.
If your CVS account on source has been set up, after you type your password and hit ok, then the workgroup files will be downloaded to your machine.The website files will appear in the
web
subdirectory. Edit the files as you see fit. To associate the file with a specific editor, e.g. WordPad, right click on the file and chooseExplore
from the menu. Right click again on your file and select<Open with...> Wordpad
. When you are through editing, then right click and selectCVS Commit
, enter a log message and select OK.To update the website, go to your workgroup, log in to the website scroll to the bottom of the page and select
CVS Update
.You are done, the rest of this page does not really apply to TortoiseCVS users.
TortoiseCVS Problems
The Handle is Invalid
If you get a window like:then you can probably ignore the message without any ill effects.
TortoiseCVS Reinstallation
It turns out that some of the problems stem from installing Tortoise 1.12 and then trying to roll back to Tortoise 1.10. In particular, the cvs command in C:Program Files (x86)CVSNT would not run because it was missing a shared library. The way I determined this was by running the command from a DOS shell. The fix here is that if one uninstalls TortoiseSVN to make sure that CVSNT and any Tortoise Overlay installations are uninstalled. To check use the "Add Programs" facility.Cygwin install under Windows
There are two methods of installing Cygwin: Downloading from the Ptolemy II website or downloading directly from the Cygwin website.
The advantage of downloading Cygwin from the Ptolemy II website is that the download is somewhat smaller since only essential parts of Cygwin are included - hence this download would be useful if you are dialed in over a slow modem.
The advantage of downloading from the Cygwin website is that you will get the most recent versions of the software.
Download from the Ptolemy II Website You can download the version of Cygwin that is included with the most recent Ptolemy II distribution fromhttp://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
OR
Download from the Cygwin website Install the Cygwin toolkit fromhttp://www.cygwin.com/
The Cygwin installer tends to change over time, but below is a summary of the steps necessary:
- Create an empty directory
- Download
http://www.cygwin.com/setup.exe
and save it in the empty directory - Click on
setup
, thenNext
- Select
Install from Internet
, then click onNext
- Use the default install root directory, which should be
c:/cygwin
- Select 'Default Text File Type' of DOS.
If you select Unix instead of DOS, then you will likely have Cygwin CR/NL problems. - Hit the
Next
button. - Use the default Local Package Directory, which should be the directory you created above.
- If you are not behind a firewall, click on direct connection, then click
Next
- Select a nearby mirror, then click
Next
- You will be presented with a list of packages to install.
A complete installation takes at least 75Mb.At the minimum, select the packages below, which is roughly a 3Mb download that expands into an 8.7Mb installation.
- Base Category
- ash - For
/bin/sh
- bash
- cygwin
- diff - Configure uses
cmp
- fileutils - For
ls
- grep - Used by configure
- sed - Needed by config.status, which is created by configure
- sh-utils - For
basename
- textutils - For
cat
andtr
- ash - For
- Devel Category
- cvs
- make
- Net Category
- openssh
If you are serious about development you may also want:
- Devel Category: autoconf - requires gawk and m4 from the Interepreters Category
- Base Category
- findutils
- gzip
- tar
- Text Category: less
- Base Category
- After installation, you may remove the temporary directory in which the zip file was unzipped.
c:/cygwin/etc/passwd
is created during the Cygwin installation. If your Windows account is a domain account and not a local account, then you may need to add an entry toc:/cygwin/etc/passwd
by hand.
To do this, start up the Cygwin bash shell with Start ->?Cygwin
Then use themkpasswd
command to append a line with your login information, for example, I used:mkpasswd -l > /etc/passwd mkpasswd -d -u cxh --path-to-home=/cygdrive/c/users >> /etc/passwd
mkpasswd -h
will print out help for themkpasswd
command- Set bash to ignore carriage returns 'r' The problem is that shell scripts such as
$PTII/bin/vergil
will fail:$ export PTII=c:/user/ptII $ $PTII/bin/vergil c:/user/ptII/bin/vergil: line 30: $'r': command not found c:/user/ptII/bin/vergil: line 40: $'r': command not found c:/user/ptII/bin/vergil: line 43: $'r': command not found c:/user/ptII/bin/vergil: line 48: $'r': command not found c:/user/ptII/bin/vergil: line 67: syntax error near unexpected token `$'inr'' ':/user/ptII/bin/vergil: line 67: ` case "`uname -s`" in
Another possible solution is to create a
~/.bash_profile
that containsexport SHELLOPTS set -o igncr
To find your home directory, start up Cygwin bash and typecd;pwd
. Then use an editor like Wordpad. See also:http://cygwin.com/ml/cygwin-announce/2006-12/msg00026.html
- The 2006 Cygwin announcement that covers this.- This problem is similar to the Cygwin CR/NL problems. What has changed is that the Cygwin installer appears to no longer offer the possibility of selecting DOS as the default file type.
http://comments.gmane.org/gmane.os.cygwin/115453
- discussion about the issue.http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
- info about why paths likec:/
do not use/etc/fstab
.http://cygwin.com/cygwin-ug-net/using.html#mount-table
- Cygwin manual for/etc/fstab
.
- For Unix, download from
- If you are running the
cvs
command line commands and not using TortoiseCVS or Eclipse, then note that the cvs commands are run on your own machine, not onsource.eecs.berkeley.edu
. For security reasons, most logins onsource.eecs
are running in a restricted shell, so not much can be done onsource.eecs
. The idea behind CVS is that CVS copies a version of a source repository onsource.eecs
to your local machine. Thecvs
commands are run on your local machine, the only reason to log on tosource.eecs.berkeley.edu
is to change your password (using thepasswd
command or to set up using CVS without typing your password each time? - Make sure that the CVS_RSH environment variable is set to
ssh
.
To check under Windows, start up a Bash shell (Start->Programs->Cygnus Solutions->Cygwin Bash Shell) and typeecho $CVS_RSH
. If it is not set, then set it using Start->Settings->Control Panel->System->Advanced->Environment Variables CVS_RSH should be added and set tossh
.
You may want to check that your path has been set to include Cygwin, which is located atc:cygwinbin
To check under Unix, start a shell and type
echo $CVS_RSH
. If CVS_RSH is not set, then edit your shell startup files to set it automatically. If you run C-shell (csh), or some variant like tcsh, edit~/.cshrc
and addsetenv CVS_RSH ssh
If you run the Bourne shell (sh) or some variant like bash, edit~/.profile
and addexport CVS_RSH=ssh
- Create a file in your home directory called
.cvsrc
that contains:update -P -d
This is necessary so that when you runcvs update
, then the-P
and-d
flags are automatically appended.cvs update -P -d
will prune any directories that contain no files and create any new directories that someone else has checked in.
If you do not create a~/.cvsrc
file, then you will need to runcvs update -P -d
instead ofcvs update
- Once you have received email stating that your cvs account is setup, log on to the cvs server with
ssh source
:ssh source.eecs.berkeley.edu
If your source login is different from your local login then you useusername@source.eecs.berkeley.edu
ssh username@source.eecs.berkeley.edu
If you have a UC Berkeley EECS computer account, then your login on source should be the same as your UC Berkeley EECS login. If you don't have a UCB EECS computer account, then your login is probably 8 characters or less and is your first initial followed by your name. If you have questions, respond to the email that you received when you got your password.
Once successfully logged in change your password with the
passwd
command to something more reasonableclaudius@maury 67% ssh elvis@source.eecs.berkeley.edu elvis@source's password: Last login: Fri Aug 27 17:50:34 1999 from maury.eecs.berke^M No mail. $ passwd passwd: Changing password for elvis Enter login password: New password: Re-enter new password: passwd (SYSTEM): passwd successfully changed for ptolemy $ exit Connection to source closed. claudius@maury 68%
- To check out the CVS repository associated with a workgroup, you need to know where the repository is located. All the repositories for the CHESS, Embedded and TRUST sites are on
source.eecs.berkeley.edu
.- CHESS
:ext:source.eecs.berkeley.edu:/home/cvs_chess
- Embedded
:ext:source.eecs.berkeley.edu:/home/cvs_embedded
- TRUST
:ext:source.eecs.berkeley.edu:/home/cvs_trust
foo
website, on CHESS, the command line would beexport CVS_RSH=ssh cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_chess co foo
If your username on source is different than your local username:export CVS_RSH=ssh cvs -d :ext:username@source.eecs.berkeley.edu:/home/cvs_chess co foo
- The CVS repository for each workgroup has a
web
subdirectory that contains the website. There may also be adjacent directories that contain software projects.
To change the website, cd into thefoo/web
directory and edit a file - Commit your changes with
cvs commit -m "message about your change" fileyouedited
You will then be prompted for your password, and the change will be committed. - Go to a page in that workspace. You will see an "CVS Update" link in the toolbar at the bottom of the page. Click on it.
- Press on the "Go back" link and make sure that the pages are what you expect.
Common Problems
Can't get the initial download
- Make sure you have the right username and password. Use
ssh username@source.eecs.berkeley.edu
to verify you can connect - Maybe the
CVS_RSH
variable is not set tossh
. Try:echo $CVS_RSH
you should seebash-3.00$ echo $CVS_RSH ssh bash-3.00$
- Try
ssh username@source.eecs.berkeley.edu cvs --version
You should see something likebash-3.00$ ssh elvis@source.eecs.berkeley.edu cvs --version password: XXXXXX Concurrent Versions System (CVS) 1.11.22 (client/server) Copyright (C) 2006 Free Software Foundation, Inc. Senior active maintainers include Larry Jones, Derek R. Price, and Mark D. Baushke. Please see the AUTHORS and README files from the CVS distribution kit for a complete list of contributors and copyrights. CVS may be copied only under the terms of the GNU General Public License, a copy of which can be found with the CVS distribution kit. Specify the --help option for further information about CVS bash-3.00$
If you don't see that results, but you can log in, then there is a problem with your account on source