*banner
 

Chess Sponsors and Researchers who attend reviews
FAQ
Previous section  |  This section  |  Next section
Previous question  |  This question  |  Next question

How do I edit pages in a group with the CVS Authoring option?
Christopher Brooks, 18 Aug 2005
Last updated: 10 Jan 2014

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

  1. 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 of source.eecs.berkeley.edu, for example, elvis@source.eecs.berkeley.edu
  2. 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 run passwd to change your password.
  3. Install CVS and SSH. If you are using Windows, try TortoiseCVS,
  4. If you are using the command line, be sure that the CVS_RSH environment variable is set to ssh.
  5. 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

     

  6. If you are using a cvs command line client, then set the CVS_RSH environment variable to ssh. So, for example to check out the foo website, on CHESS, the command lines would be
          export CVS_RSH=ssh
          cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_chess co foo
        
    Or, if your login on source.eecs.berkeley.edu was elvis, the command lines would be:
          export CVS_RSH=ssh
          cvs -d :ext:elvis@source.eecs.berkeley.edu:/home/cvs_chess co foo
      
  7. Make your changes to your local copy of the repository.
  8. Commit your changes by providing a useful message:
          cd foo
          cvs commit -m "message describing your changes"
      
  9. 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

  1. 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 then Configure Group link and verifying that CVS Module and CVS Checkin are selected.
    If these two choices are not selected, then select them and hit the Change 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.
  2. If you don't yet have a CVS account on source.eecs.berkeley.edu, get one. You can request a CVS account.
  3. 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 up explorer.
      • 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 use Secure 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
        Below is a sample screen shot that would be used to check out the TRUST website:

        Screenshot of TortoiseCVS

        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 choose Explore from the menu. Right click again on your file and select <Open with...> Wordpad. When you are through editing, then right click and select CVS 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:

        TortoiseCVS Error Message: Handle Is Invalid

        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 from http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
        OR
        Download from the Cygwin website Install the Cygwin toolkit from http://www.cygwin.com/

        The Cygwin installer tends to change over time, but below is a summary of the steps necessary:

        1. Create an empty directory
        2. Download http://www.cygwin.com/setup.exe and save it in the empty directory
        3. Click on setup, then Next
        4. Select Install from Internet, then click on Next
        5. Use the default install root directory, which should be c:/cygwin
        6. Select 'Default Text File Type' of DOS.
          If you select Unix instead of DOS, then you will likely have Cygwin CR/NL problems.
        7. Hit the Next button.
        8. Use the default Local Package Directory, which should be the directory you created above.
        9. If you are not behind a firewall, click on direct connection, then click Next
        10. Select a nearby mirror, then click Next
        11. 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 and tr
          • 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
      • 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 to c:/cygwin/etc/passwd by hand.
        To do this, start up the Cygwin bash shell with Start ->?Cygwin
        Then use the mkpasswd 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 the mkpasswd 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 contains

        	      export SHELLOPTS
        	      set -o igncr
        	    
        To find your home directory, start up Cygwin bash and type cd;pwd. Then use an editor like Wordpad. See also:
  4. 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 on source.eecs.berkeley.edu. For security reasons, most logins on source.eecs are running in a restricted shell, so not much can be done on source.eecs. 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?
  5. 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 type echo $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 to ssh.
    You may want to check that your path has been set to include Cygwin, which is located at c: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 add

          setenv CVS_RSH ssh
        
    If you run the Bourne shell (sh) or some variant like bash, edit ~/.profile and add
          export CVS_RSH=ssh
      
  6. Create a file in your home directory called .cvsrc that contains:
          update -P -d
        
    This is necessary so that when you run cvs 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 run cvs update -P -d instead of cvs update
  7. 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 use username@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 reasonable

          claudius@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%
    
      
  8. 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
    So, for example to check out the foo website, on CHESS, the command line would be
          export 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
      
  9. 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 the foo/web directory and edit a file
  10. 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.
  11. 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.
  12. 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 to ssh. Try:
          echo $CVS_RSH
        
    you should see
          bash-3.00$ echo $CVS_RSH
          ssh
          bash-3.00$ 
      
  • Try
          ssh username@source.eecs.berkeley.edu cvs --version
        
    You should see something like
          bash-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
Previous section  |  This section  |  Next section
Previous question  |  This question  |  Next question
©2002-2018 Chess