*banner
 
 

Old CVS FAQ from Gigascale

Below is a copy of the old CVS faq from http://www.gigascale.org/softdevel/faq/1/.

CVS

Information about Concurrent Version Control (CVS) for CHESS webpage authors and developers.

How do I get a CVS account
CVS accounts are available to anyone who has a login on CHESS, TRUST or Embedded, and is working on a project that is doing software development. To request a CVS account, use the CVS Account Request Form. You should get email with your account details within a day or so. (If not, by all means send email to webmaster@gigascale.org asking about the status of your request!)

Note that CVS accounts cannot be created in response to a simple email request. The form above generates passwords and a script that is used to create your account, saves a lot of time and generally makes the whole process more reliable. It helps us a lot if you use it :-)

What do I do to get started using CVS on the CHESS website?
For information about getting started with CVS, see How do I edit pages in a group with the "CVS Authoring" option?

What CVS resources are available on the Net?
  • Open Source Development with CVS
     
    Password Authenticating Server Section
  • dmoz CVS Links
  • http://www.cvshome.org/ - cvs home page
  • CVS and RCS Tutorial
  • Mailing Lists: - comp.software.config-mgmt - info-cvs archive
  • FAQ: CVS FAQ
  • CVS-Index at www.loria.fr
  • WinCVS - Windows CVS GUI
  • CVS Clients for Windows and Mac
    Under Windows, we recommend TortoiseCVS.

    Under MacOS, we recommend smartcvs.

    What CVS Resources are available locally?
  • CVS and SSH binaries for Windows
  • Ben Horowitz' CVS How-to for CHESS
  • John Reekie's CVS notes, including information about setting up under windows.
  • Documentation
  • CVS Manual in HTML
  • CVS FAQ
  • CVS PostScript and PDF documentation
  • The CVS and SSH installer includes CVS documentation in Windows Help format which was taken from WinCVS. The two Windows Help format files are available as cvshlp.zip
  • CVS HTML Documentation (Dated 5/1/96)
  • Man pages: cvs(1) - cvs(5) - cvsbug
  • Common CVS Commands
    Below is some text from William Wu about CVS commands
    cvs import [module|file]
    add files/modules into the repository directory.
    cvs commit [module|file]
    Check in your modified files/module to the repository, creates a new file that merge your file and the one in repository. Note it is a MERGE not a replace, so it could cause problem. A good rule is to after you modified the file, do a cvs update (see below) first, so you have the newest version, and try to recompile and run, so that you can find any conflict that arise.
    cvs update [module|file]
    updates your files to the files in the repository, if you have made some change to your files, it will merge the two. This is always a good thing to do before you do commit, since someone else can modify the file and check in after you last update, thus it is possible the changes he made is in conflict with you changes. By doing a update, you can find out about the changes he made and spot any conflict. (conflict is indicated by a letter c in front of file name, in the messages from CVS)
    You can run cvs -n update to preview what would happen if you ran cvs update. The -n option does not change any files, it only issues reports.
    Note that usually you will want to use cvs update -P -d, which Prunes empty directories and creates new directories. You can set this as the default by creating a ~/.cvsrc file that contains the line
    update -P -d
    
    If you run cvs update without the -d flag, then you might not get any new directories created
    cvs checkout [module|file]
    Use this when you check out the files/module for the first time. When someone had import a new file in, you can use this command to check it out, or I think do a update on the module will also add the new file to you directory.
    cvs status [module|file]
    Give a status report on the files comparing with the newest version in the repository. The files status can be Up-to-Date, Modified ... Uses this command before commit, then you can check if you need to do a update or not.
    cvs diff [module|file]
    does a diff with your file and its newest version in repository.
    cvs history [module|file]
    gives a report on the history of modication done on this file, users, date etc.

    These are some commonly used ones, you can always use cvs(1) man page for help.

    Common CVS Tasks

    Checking out just one directory

    The old symbolic links method we used with SCCS probably won't work as well. Your best bet is to just check out the entire tree

    To check out just one directory outside of your tree, you can use the directory name with cvs checkout

    cvs checkout ptII/ptolemy/plot
    
    will create the directory ptII/ptolemy/plot in the current directory.

    .cvsrc file

    Brian Evans suggested that if your ~/.cvsrc file contains the following:
    cvs -z3
    update -d -P
    
    Then you will get the following features automatically:
    cvs -z3
    compression when doing a cvs checkout. This can be especially useful when you are dialed in from home
    update -d -P
    When you do cvs update, create and prune directories as necessary.
    The alternative is to use the command line arguments each time you run the appropriate commands.

    Checking out a tree for a particular date

    cvs -d :ext:gigasource.eecs.berkeley.edu:/home/cvs co ptII
    cd ptII
    cvs update -d -P
    cvs update -D 7/14/2000 -d -P
    setenv PTII `pwd`
    make
    
    If you are under bash, then instead of setenv PTII `pwd`, do
    PTII=`pwd`
    export PTII
    

    Notes:

    After doing the cvs co with the -d :ext:gigasource.eecs.berkeley.edu:/home/cvs flag, you need not specify the -d flag again. That value is cached in the CVS subdirectory in each directory

    In 'cvs update -d -P', the -d flag means something different than the -d :ext:gigasource.eecs.berkeley.edu:/home/cvs flag Here, -d means create directories -P means prune empty directories.

    How do I use CVS with Eclipse?
    Using CVS with Eclipse can be tricky.

    The Eclipse FAQ has some info.

    Eclipse 2.0 Features page might be of use is of use.

    The Ptolemy II Eclipse Instructions has some hints.

    Administrative CVS Commands
    Below are some common scenarios for fixing up the CVS database. See the FAQ for more examples.

    Ignoring files

    /users/cvs/Repository/CVSROOT/cvsignore contains the patterns for files that are ignored when cvs update is done. If cvsignore includes *.class, then when you do cvs update, you won't see messages like
    ? DEActor.class
    ? DEDirector.class
    

    Adding a directory

    1. Create the directory
      mkdir foo
      
    2. Update the Repository and create foo/CVS
      cvs add foo
      
    3. Populate foo with your files
    4. Add the files:
      cd foo
      cvs add file1 file2
      
      cvs commit
      

    Deleting a file

    1. (optional) Make sure that you do not have any uncommitted changes to the file:
      cvs update foo.c
      
    2. Tell CVS you want to remove the file:
      cvs delete -f foo.c
      
      The -f option forces cvs to delete the file from the current directory.
    3. Commit the changes, move the file to the CVS attic directory
      cvs commit foo.c
      

    Fixing a Binary file

    This is covered in Chapter 9 of the CVS documentation.

    If a file gets added without -kb, then you can fix it with

    1. cvs admin -kb foo.class
      
    2. cvs update  -A foo.class
      
      
    3. Then copy in a good copy of the file from outside CVS.
    4. cvs commit -m "Make it binary" foo.class
      
    cvs remove -f foo.c will remove the file for you.

    Renaming a file

    The faq says:
     4. How do I rename a file?
    
       CVS does not offer a way to rename a file in a way that CVS can track
       later. See Section 4B for more information.
    
       Here is the best (to some, the only acceptable) way to get the effect
       of renaming, while preserving the change log:
    
         Copy the RCS (",v") file directly in the Repository.
    
       cp $CVSROOT//,v $CVSROOT//,v
    
       By duplicating the file, you will preserve the change history and the
       ability to retrieve earlier revisions of the old file via the "-r
       " or "-D " options to "checkout" and "update".
    
         Remove the old file using CVS.
    
       cd / rm 
                    cvs remove 
    
                    cvs commit 
    
       This will move the  to the Attic associated with .
    
         Retrieve  and remove all the Tags from it.
    
       By stripping off all the old Tags, "checkout -r" and "update -r" won't
       retrieve revisions Tagged before the renaming.
    
       cd /
                    cvs update 
                    cvs log                  # Save the list of Tags
                    cvs tag -d  
    
                    cvs tag -d  
                    . . .
      This technique can be used to rename files within one directory or
       across different directories. You can apply this idea to directories
       too, as long as you apply the above to each file and don't delete the
       old directory.
    
       Of course, you have to change your build system (e.g. Makefile) in
       your  to know about the name change.
    
       Warning: Stripping the old tags from the copied file will allow "-r
       " to do the right thing, but you will still have problems with
       "-D " because there is no place to store the "deletion time".
       See 5B.3 for more details.
    
       Last modified: _6/13/1997_
    
    

    EDITOR Variable
    When CVS commits a change, it needs a log message. One quick workaround is to use the -m "log message" option to commit:
    cvs commit -m "Fixed off by one error" foo.java
    
    If you do not use the -m option, then CVS will need a log message. When CVS needs a log message, it reads the EDITOR environment variable to determine which editor to startup.

    If you set EDITOR to emacs, then each time CVS needs a log message it will start up an emacs. If you always have an emacs process running. Consider using emacsclient instead.

    1. Edit your ~/.emacs file and add
      (server-start)
      
      to it
    2. Edit your ~/.cshrc file and add
      setenv EDITOR emacsclient
      
    Now, when you CVS needs a log message, it will bring up a window in your emacs process. When you are done editing, type C-x #

    For more information about emacsclient, start up emacs and type M-x info and search for the emacs online documentation.

    There is an easier solution:
    If you use emacs as your editor, then you can use C-x C-q to commit your change. After filling in the message, type C-c C-c to exit the log message editor window. For C-x C-q to work with CVS from a laptop you must have your laptop set up so that it does not require a password when committing a cvs change. See How do I use CVS without typing my password each time? for details.

    How do I use CVS without typing my password each time?
    To use CVS without typing your password, you will need an individual account on gigasource.

    If your CVS account was created after September 2000, then it is fairly likely that you already have an individual account.

    If you would like to check, log in to your cvs account on gigasource and run pwd.

  • If your home directory is /home/cvsusers then you not have an individual account. You should follow the instructions in How do I get a CVS account? and request an individual account. In the comments section be sure to state that you think you have a shared account and that you would like your account recreated as an individual account so that you do not have to type your password.
    A CHESS Adminstrators will edit /etc/passwd and /etc/shadow and remove your account and then recreate your account.
    CHESS Admins can view How are cvs accounts created? for details.
  • If your home directory is anything but /home/cvsusers, then you already have an individual account, and you can proceed without sending email
  • For example, the ptolemy users does not have an individual account, so email should be sent:
    cxh@maury 1% ssh gigasource -l ptolemy
    ptolemy@gigasource's password:
    
    Last login: Mon Mar 26 22:01:19 2001 from julian.eecs.ber
    $ pwd
    /home/cvsusers
    $ exit
    Connection to gigasource closed.
    cxh@maury 2%
    
    

    The steps below are slightly modified from the CVS SSH instructions

    SSH (and therefore CVS) can use RSA and Rhosts style authentication to make it so that you can login without typing your password. Using Rhosts authentication alone is insecure, and most CVS servers (this one included) disallow it. RSA can be used with or without Rhosts authentication. Using RSA alone, any user with the appropriate RSA key and passphrase can access the repository. Using RSA and Rhosts restricts repository access to only computers listed in Rhosts that also have the appropriate RSA key.

    Note that for RSA with Rhosts authentication to work, each host that you are logging in from needs to be listed in two files. If you are connecting from multiple hosts via dynamic DSL, then each time you connect, you are likely to have a different address, which makes managing the file difficult. There are several possible solutions, one is to try to use wildcards in ~/.ssh/known_hosts and ~/.shosts, the other is to run a script that updates these files automatically. Both solutions are complex and have security issues, so we do not cover them here. It is much simpler to use RSA authentication alone in this case.

    RSA authentication

    Once your account has been set up, do the following:

    1. Create ~/.ssh/id_rsa.pub on the local machine: If ~/.ssh/id_rsa.pub does not exist, on your local machine, then create it by running ssh-keygen -t rsa
      When prompted for a passphrase, hit return. If you type in a passphrase here, you will be prompted for that passphrase each time.
      Running ssh-keygen will generate the files ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub, which are your private and public encryption keys respectively.
    2. Create ~/.ssh/authorized_keys2 on gigasource: Set the permission of ~/.ssh/id_rsa.pub to 0644 and then copy ~/.ssh/id_rsa.pub over to ~/.ssh/authorized_keys2 with the scp -p flag to preserve permissions.
      chmod 0644 ~/.ssh/id_rsa.pub
      scp -p ~/.ssh/id_rsa.pub yourgigasourcelogin@gigasource:~/.ssh/authorized_keys2
      
      where yourgigasourcelogin is the your CVS login on gigasource.
    3. From the local machine, test ssh with:
      ssh yourgigasourcelogin@gigasource cvs
      
      
      to check the set up.
    Below is a sample run
    cxh@DOPLAP03 ~
    $ ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/cygdrive/c/cxh/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /cygdrive/c/cxh/.ssh/id_rsa.
    Your public key has been saved in /cygdrive/c/cxh/.ssh/id_rsa.pub.
    The key fingerprint is:
    03:2a:8a:3b:96:93:6b:74:86:c8:ea:30:e2:c9:11:68 cxh@DOPLAP03
    
    cxh@DOPLAP03 ~
    $ chmod 0644 ~/.ssh/id_rsa.pub
    
    cxh@DOPLAP03 ~
    $ scp ~/.ssh/id_rsa.pub cxh@gigasource:~/.ssh/authorized_keys2
    The authenticity of host 'gigasource (128.32.171.225)' can't be established.
    RSA key fingerprint is 74:57:84:9b:ca:b8:44:1d:fa:f0:e3:27:29:ac:19:c6.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'gigasource,128.32.171.225' (RSA) to the list of know
    n hosts.
    cxh@gigasource's password:
    id_rsa.pub           100% |*****************************|   222       00:00
    
    cxh@DOPLAP03 ~
    $ ssh cxh@gigasource cvs
    Usage: cvs [cvs-options] command [command-options-and-arguments]
      where cvs-options are -q, -n, etc.
        (specify --help-options for a list of options)
      where command is add, admin, etc.
        (specify --help-commands for a list of commands
         or --help-synonyms for a list of command synonyms)
      where command-options-and-arguments depend on the specific command
        (specify -H followed by a command name for command-specific help)
      Specify --help to receive this message
    
    The Concurrent Versions System (CVS) is a tool for version control.
    For CVS updates and additional information, see
        the CVS home page at http://www.cvshome.org/ or
        Pascal Molli's CVS site at http://www.loria.fr/~molli/cvs-index.html
    
    cxh@DOPLAP03 ~
    $
    
    The above steps should not prompt you for your password each time you run a cvs command. There are two ways to enable yourself to not type a passphrase each time.

    The first is to use only RSA authentication as described above, and give an empty passphrase. Note that this means that if someone steals your laptop and breaks into your account, they will be able to use the ssh command to get on to your Unix account. RSA authentication works with ssh1 and ss2.

    The second way is to set up Rhosts RSA authentication, which currently only works with ssh1. In this case, ssh will authenticate your computer instead of you. It is somewhat safer for your computer to log in without a password because the CVS server can determine where your computer is located. Your computer can only login without a password if it also has the correct name and IP. This method is shown below.

    Rhosts RSA authentication

    These instructions apply to ssh1 clients, like the version of ssh that is currently shipped with cvsssh. For ssh2, see above.
    1. Setup ~/.shosts on gigasource: Create a temporary file on your local machine that contains the name of the host you will be logging in from.
      echo "myhost.eecs.berkeley.edu" > /tmp/shosts
      
    2. Change the permissions of the file on you local machine so that it is only readable by you. Note that you can't run chmod on the remote machine under rksh, so you need to fix the permissions before you copy the file over.
      chmod 0600 /tmp/shosts
      
    3. Copy the file over:
      scp /tmp/shosts gigasource:~/.shosts
      
      Below is a sample session
      ptolemy@myhost 4% echo "myhosts.eecs.berkeley.edu" > /tmp/shosts
      ptolemy@myhost 5% chmod 0600 /tmp/shosts
      ptolemy@myhost 6% scp /tmp/shosts gigasource:~/.shosts
      Enter passphrase for RSA key 'ptolemy@myhost.eecs.berkeley.edu': your passphrase
      
      ^Mshosts                    |          0 KB |   0.0 kB/s | ETA: 00:00:00 | 100%
      
      ptolemy@myhost 7%
      
    4. On your Windows machine, check to see if the file c:\ssh\etc\ssh_host_key.pub exists:
      1. If it does not exist, generate host keys on your Unix machine and copy them over. Note that the ssh-keygen command that is shipped with the Windows CVS SSH package will not work, you should run ssh-keygen on a Unix host. Note that the -N below indicates that your computer will not have a passphrase.
           cd /tmp
           ssh-keygen -b 1024 -f ssh_host_key -N ''
           
        On Windows, you can copy the files with scp. If you use scp here, note that scp does not understand the Windows c: naming convention, it think c: is a machine named 'c'. To copy the file under bash on Windows:
           cd c:/ssh/etc
           scp yourunixmachine:/tmp/ssh_host_key.pub .
           scp yourunixmachine:/tmp/ssh_host_key .
           
        On the Unix machine, remove /tmp/ssh_host_key
      2. If c:/etc/ssh/ssh_host_key.pub exists on your Windows machine, copy it to a temporary file on the Unix machine:
                cd c:/ssh/etc
                scp ssh_host_key.pub yourunixmachine:/tmp
           
    5. Set up ~/.ssh/known_hosts on gigasource: On gigasource, ~/.ssh/known_hosts lists hosts that are allowed to connect without a password. Since we can't edit files on gigasource from the restricted shell, we create the file on the local machine and copy it over to gigascale.
      Note that if you are connecting from multiple machines, you will need to add a line to this file for each machine you are connecting from. The easiest way to do this is to use scp to transfer the file to a local machine, edit the file locally and then scp it back to gigasource.
      1. Grab the contents of the copy of ssh_host_key.pub that you either generated or copied over, and create a temporary file
      2. Add the fully qualified domain name of the windows machine to the beginning of the line. You should end up with something like
        maury.eecs.berkeley.edu 1024 17 27348124368712489214987214872164987243
        
        Where the last number is several lines long.
      3. Copy the file:
        scp /tmp/known_hosts gigasource:~/.ssh/known_hosts
        
    6. From the local machine, test ssh with:
      ssh -v gigasource cvs
      
      you should not have to type in your password.

    Troubleshooting CVS SSH under NT

    1. Run
      ssh -v yourunixmachine cvs
      
      and check the output, which should look like:
      ptolemy@carson 8% ssh -v gigasource cvs
      SSH Version 1.2.26 [sparc-sun-solaris2.5.1], protocol version 1.5.
      Standard version.  Does not use RSAREF.
      carson.eecs.berkeley.edu: Reading configuration data /etc/ssh_config
      carson.eecs.berkeley.edu: ssh_connect: getuid 4035 geteuid 0 anon 0
      carson.eecs.berkeley.edu: Connecting to gigasource [128.32.171.225] port 22.
      carson.eecs.berkeley.edu: Allocated local port 1021.
      carson.eecs.berkeley.edu: Connection established.
      carson.eecs.berkeley.edu: Remote protocol version 1.5, remote software version \
      1.2.26
      carson.eecs.berkeley.edu: Waiting for server public key.
      carson.eecs.berkeley.edu: Received server public key (768 bits) and host key (1\
      024 bits).
      carson.eecs.berkeley.edu: Host 'gigasource' is known and matches the host key.
      carson.eecs.berkeley.edu: Initializing random; seed file /users/ptolemy/.ssh/ra\
      ndom_seed
      carson.eecs.berkeley.edu: Encryption type: idea
      carson.eecs.berkeley.edu: Sent encrypted session key.
      carson.eecs.berkeley.edu: Installing crc compensation attack detector.
      carson.eecs.berkeley.edu: Received encrypted confirmation.
      carson.eecs.berkeley.edu: Trying rhosts or /etc/hosts.equiv with RSA host authe\
      ntication.
      carson.eecs.berkeley.edu: Remote: Accepted by .shosts.
      carson.eecs.berkeley.edu: Remote: Your host key cannot be verified: unknown or \
      invalid host key.
      carson.eecs.berkeley.edu: Remote: The host name used to check the key was 'cars\
      on.eecs.berkeley.edu'.
      carson.eecs.berkeley.edu: Remote: Try logging back from the server machine with\
       the canonical host name using ssh, and then try again.
      carson.eecs.berkeley.edu: Server refused our rhosts authentication or host key.
      carson.eecs.berkeley.edu: No agent.
      carson.eecs.berkeley.edu: Trying RSA authentication with key 'ptolemy@maury.eec\
      s.berkeley.edu'
      carson.eecs.berkeley.edu: Received RSA challenge from server.
      carson.eecs.berkeley.edu: Bad passphrase supplied for key file /users/ptolemy/.\
      ssh/identity.
      Enter passphrase for RSA key 'ptolemy@maury.eecs.berkeley.edu': your CVS passphrase
      
      carson.eecs.berkeley.edu: Sending response to host key RSA challenge.
      carson.eecs.berkeley.edu: Remote: RSA authentication accepted.
      carson.eecs.berkeley.edu: RSA authentication accepted by server.
      carson.eecs.berkeley.edu: Requesting X11 forwarding with authentication spoofin\
      g.
      carson.eecs.berkeley.edu: Sending command: cvs
      carson.eecs.berkeley.edu: Entering interactive session.
      Usage: cvs [cvs-options] command [command-options-and-arguments]
        where cvs-options are -q, -n, etc.
          (specify --help-options for a list of options)
        where command is add, admin, etc.
          (specify --help-commands for a list of commands
           or --help-synonyms for a list of command synonyms)
        where command-options-and-arguments depend on the specific command
          (specify -H followed by a command name for command-specific help)
        Specify --help to receive this message
      
      The Concurrent Versions System (CVS) is a tool for version control.
      For CVS updates and additional information, see
          Cyclic Software at http://www.cyclic.com/ or
          Pascal Molli's CVS site at http://www.loria.fr/~molli/cvs-index.html
      carson.eecs.berkeley.edu: Transferred: stdin 0, stdout 716, stderr 0 bytes in 0\
      .1 seconds
      carson.eecs.berkeley.edu: Bytes per second: stdin 0.0, stdout 12490.8, stderr 0\
      .0
      carson.eecs.berkeley.edu: Exit status 1
      ptolemy@carson 9%
      
    2. Check the value of the CVSROOT environment variable. It should be something like: :ext:myhost.eecs.berkeley.edu:/users/cvs/Repository
    3. Be sure that you have created a key on the Unix side and copied the identity* files from Unix to NT
    4. Be sure that $HOME is set for your NT account
    5. Try using the ssh.exe binary that the $CVS_RSH variable refers to. Below is an example where we rsh over to carson and get the date:
           bash-2.02$ echo $CVS_RSH
           D:\Program Files\Ptolemy\CVS SSH\ssh.exe
           bash-2.02$ /Program\ Files/Ptolemy/CVS\ SSH/ssh carson date
           Enter passphrase for RSA key 'cxh@myhost.eecs.berkeley.edu':
           ld.so.1: /usr/local/bin/xauth: warning: /usr/4lib/libXmu.so.4.0: has older revision than expected 10
           Thu Feb  4 15:35:06 PST 1999
      
      Below is an example that failed because of an incorrect CVS password, note that the password is prompted for twice:
           bash-2.02$ /Program\ Files/Ptolemy/CVS\ SSH/ssh carson date
           Enter passphrase for RSA key 'cxh@myhost.eecs.berkeley.edu':
           Bad passphrase.
           Password:
           Permission denied.
           bash-2.02$
      
    6. Verify that you can use ssh to connect between two Unix boxes.
    7. Check ssh_config. RSAAuthentication and/or RhostsRSAAuthentication must be turned on. One way to do this locally is by having an /Program\ Files/Ptolemy/CVS\ SSH/ssh_config file that looks like:
      Host *
              RSAAuthentication yes
              RhostsRSAAuthentication yes
      
    8. Reboot NT.

    Using CVS from a laptop

    Using a laptop with CVS

    If you are using CVS from a laptop, and you are not always connected to the net, you may want to create a shell script that contains a list of the cvs commands that you want to execute when you are connected.

    For example, if the file doit.sh contained:

    cvs commit -m "Fixed spelling error" $PTII/README
    cvs commit -m "Updated version number " $PTII/makefile
    
    then when you connected again, you could run the script with /bin/sh doit.sh.

    One caveat is that this system works best if you set up ssh to use RSA-style authentication, so that it does not prompt for a password each time. See the How do I use CVS without typing my password each time? question for details.

    How do I change my CVS account password?
    The cvs account you were given can do only two thing: run the cvs command and run the passwd command. To change the password, use ssh to connect to gigasource.eecs.berkeley.edu and then run passwd.
    cxh@maury 139% ssh -l ptolemy gigasource
    ptolemy@gigasource's password:
    No mail.
    $ passwd
    passwd:  Changing password for ptolemy
    Enter login password:
    
    New password:
    Re-enter new password:
    passwd (SYSTEM): passwd successfully changed for ptolemy
    $ exit
    Connection to gigasource closed.
    cxh@maury 140%
    
    

    Note that your CVS account is separate from your CHESS website account. Not all CHESS members will necessarily have a CVS account.

    Having your password changed for you

    If you have forgotten your CVS password, then send email to www@gigascale.org and state your name and the name of your CVS account in case it is different from the name of the account you are sending email from

    The CHESS staff will do the following:

    1. Determine the proper account name by searching /etc/passwd with grep login /etc/passwd
    2. As root on gigasource, run passwd login and change the password
    3. email the new password to the user, prompting them to change it

    How do I edit pages in a group with the "CVS Authoring" option?
    The answer is covered in the gsrc Rocket-Science FAQ.

    CVS thinks I'm Administrator, not myself
    If, under Windows, when you run cvs update you are prompted for the Administrator password on the CVS repository, or you have permission problems writing to files, then you may need to set up /etc/passwd on machine to include your name and UID.

    Location of /etc/passwd

    Note that the actual location of /etc/passwd varies depending on where you installed Cygwin. If Cygwin is installed in c:/cygwin, then /etc/passwd will actually end up in c:/cygwin/etc/passwd.

    mkpasswd

    The easiest way to update /etc/passwd is to run the mkpasswd command that is included with the Cygwin toolkit. Usually, when Cygwin is installed, mkpasswd is run and /etc/passwd is automatically created. If your account was added after Cygwin was installed, then you may need to run mkpasswd by hand.

    mkpasswd -help will print out the help for mkpasswd.

    Below are a few scenarios for updating /etc/passwd:

    Your machine is in a windows domain

    If your Windows machine is a member of a Windows domain, use this command to add yourself to /etc/passwd:

    mkpasswd -d | grep yourlogin > /etc/passwd
    
    Note that if your domain is rather large, then mkpasswd -d could take a minute to complete.

    Your machine is not in a Windows domain

    To generate /etc/passwd for all the local Windows accounts, try:
    mkpasswd -l > /etc/passwd
    

    Your home directory

    /etc/passwd also defines where your home directory is. Usually, Cygwin will set your initial default home directory to /home/yourname, which maps to c:/cygwin/home/yourname.
    Unfortunately, tools like Java do not know about the Cygwin directory mapping, so you may want to reset your home directory to a location outside of the Cygwin tree.
    For example, if your home directory was at c:/users/yourname, then Cygwin would find this as /cygdrive/c/users/yourname because Cygwin mounts the c: drive as /cygdrive/c To set up Cygwin so that it finds your home directory, edit c:/cygwin/etc/passwd and change your home directory from /home/yourname to /cygdrive/c/users/yourname

    Set up /etc/passwd by hand

    Stephen Neuendorffer suggests
    Edit /etc/passwd and add a new line that contains your information.
    username::userid:groupid:fullName:home directory:/bin/sh
    Your username and fullname should be obvious. If you forget these, then CVS probably won't be much use to you! Your home directory is probably /home/username. Your groupid should probably be the same as the administrator and your userid should be some unique number that is not used elsewhere in the file and less than 65535. Adding one to the largest number in the file will probably work.
    Another suggestion for obtaining a userid is to look at your entry in /etc/passwd on a Unix machine and use that number.

    mkgroup

    There is also a mkgroup command that is similar to mkpasswd. mkgroup can be used to create /etc/group:
    mkgroup -l > /etc/group
    

    Other resources

    The CVS Account Name FAQ covers how to use a CVS repository with a login that is different than your current login. Note that even if you configure your system to properly use a different login on the cvs server, then you may still have permission problems if you do not have /etc/passwd set up properly.

    Redhat.com Cygwin mkpasswd page

    Why is my CVS account name different from my website account name?
    CVS accounts are just a restricted form of UNIX account. Because of this, when you get a CVS user account, you also get registered as an account-holder in the EECS departmental database. If you already have an EECS account, then you will get the account name that the Department already has you registered as.

    However, if you do not already have a record in the departmental database, we create a new record for you. Sometimes, your website username is already taken, in which case we have to give you a different one.

    If your login name and your CVS account name are not the same, then you can try one of the methods below

    yourname@gigasource

    When using the -d cvs option, try using yourname@gigasource.eecs.berkeley.edu
    cxh@maury 29% cvs -d :ext:ptolemy@gigasource.eecs.berkeley.edu:/home/cvs co ptII
    ptolemy@gigasource.eecs.berkeley.edu's password: the passwd
    
    cvs server: Updating ptII
    

    ssh_config

    You can modify the ssh_config file so that when you connect with ssh, you use your CVS account name.

    Under Unix, the file to modify is ~/.ssh/ssh_config, under Windows try c:sshetcssh_config.

    The format of the file is the same under Unix and Windows, the thing to do is to add a User your cvs account name:

    Host *
    	ConnectionAttempts 100
    	RhostsRSAAuthentication yes
    	User cxh
    
    Note further that to use ssh as a different use, use the -l username option, and to use scp, use -o user=username

    Under Cygwin, I get 'could not create directory /home/myname/.ssh'
    If, under Windows when running cvs via Cygwin you get a message like:
    Could not create directory '/home/yourname/.ssh'.
    The authenticity of host 'gigascale.eecs.berkeley.edu 128.32.171.xxx)' can't be established.
    RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
    Are you sure you want to continue connecting (yes/no)? yes
    Failed to add the host to the list of known hosts (/home/yourname/.ssh/known_hosts).
    yourname@maury.eecs.berkeley.edu's password:
    
    then the problem is that Cygwin has the wrong idea about where your home directory is. See CVS thinks I'm Administrator, not myself for how to fix this.

    Cygwin CR/NL problems
    When Cygwin is installed, you should be sure to select DOS for the Default Text File Type.
    If you do not, then when you check in files, there will be problems with the DOS CR/NL line endings.
    In particular, what will happen is that when you check in a file and then someone checks it out, it will have extra \r or ^M characters.

    The way to tell if this is a problem is to run the mount command under Cygwin bash and note whether the c: drive is mounted textmode or not. If the c: drive is mounted textmode, then your setup is ok:

    $ mount
    c:\cygwin\bin on /usr/bin type system (textmode)
    c:\cygwin\lib on /usr/lib type system (textmode)
    c:\cygwin on / type system (textmode)
    c: on /cygdrive/c type user (textmode,noumount)
    
    
    However, if c: is mounted binmode, then you have problems:
    $ mount
    c:\cygwin2\bin on /usr/bin type system (binmode)
    c:\cygwin2\lib on /usr/lib type system (binmode)
    c:\cygwin2 on / type system (binmode)
    c: on /cygdrive/c type user (binmode,noumount)
    

    The fastest solution is to reinstall Cygwin, see How do I edit pages in a group with the "CVS Authoring" option? and properly select DOS for the Default Text File Type.
    Another possible alternative is to use these mount commands:
    We have tried these commands but they have not quite worked for us

    mount -f -t -s c:\\cygwin\\lib /usr/lib
    mount -f -t -s c:\\cygwin\\bin /usr/bin
    mount -f -t -s c:\\cygwin /
    mount -f -t c: /cygdrive/c
    
    If you have a d: drive,you may need to do:
    mount -f -t d: /cygdrive/c
    
    When you are done, run mount, which should show all the mounts as textmode.

    The reason that this is a problem with CVS is that CVS handles end of line translation between Unix and Windows.
    If, under Cygwin, the directories are mounted binmode, then Cygwin CVS will not do the proper translations.
    For details, see How is the DOS/Unix CR/LF thing handled? in the Cygwin FAQ
    See also http://cygwin.com/cygwin-ug-net/using-textbinary.html

    To replicate the problem, install Cygwin with Unix line endings, check out a file using CVS, edit the file using wordpad and check in your changes. When you check out the file under Unix, it will have \r\n line endings.

    Note that there is some contention about whether DOS or Unix line endings are correct. The TinyOS community has required Cygwin to be set up with Unix line endings, which works great if your users are technically sophisticated. However, if your windows users do not have much exposure to Unix, then configuring Cygwin to use DOS line endings is more correct.

    Who can get a CVS account?
    Anyone that has a reason to :-)

    Seriously, the only requirements are that you have an account on the CHESS website and are working on a software development project that is located on the CHESS CVS server.

    There are two types of cvs access:

  • Read-only anonymous access accounts -
    If read-only access is available, then the workgroup administrator for you project will tell you that it is available and how to get access.
  • Read/write named access accounts -
    See Getting a CVS account
  • If you are or intend to be working on a software project that doesn't yet have a CVS repository on the CHESS server, then by all means request a login (if you don't already have one), and then request a group so that your project can start using the CHESS infrastructure. All that we require is that at least one person actively working on the project has a bona-fide connection to the CHESS in some way.

    How does anonymous password authentication work?
    Some of the repositories have anonymous cvs access, which allows anonymous users read only access
    The ptII repository moved to svn in 2008. The cvs commands below are an example of how anonymous authentication can work

    The Ptolemy II External Developers workgroup (ptexernal) was set up to allow for anonymous read only access to the Ptolemy II tree. After getting the password, the commands to run were:

    cd c:/directoryofyourchoice
    cvs -d pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon login
    # No password needed, hit enter
    cvs -d pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
    
    The old instructions used a password from http://chess.eecs.berkeley.edu/ptexternal/private/2.html.
    cvs -d :pserver:ptdeveloper@gigasource.eecs.berkeley.edu:/home/cvs/cvsanon login
    cvs -d :pserver:ptdeveloper@gigasource.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
    
    However, that repository was moved in July, 2005.

    The best reference is CVS Book: Password Authenticating Server Section

    Troubleshooting

    Anonymous read only cvs access uses the pserver facility which is found on port 2401. If you are behind a firewill, you may have problem connecting to port 2401 on gigasource. The way to test this is to use telnet gigasource.eecs.berkeley.edu 2401 to try to connect to the pserver port, and then type help:
    cxh@maury 21% telnet gigasource.eecs.berkeley.edu 2401
    Trying 128.32.171.225...
    Connected to gigasource.EECS.Berkeley.EDU.
    Escape character is '^]'.
    help
    
    cvs [pserver aborted]: bad auth protocol start: help^
    
    Connection closed by foreign host.
    cxh@maury 22%
    
    If you are running under Windows, then you may find that the Cygwin telnet binary gives better diagnostics.

    Also, the CVSROOT/config file should be set up to look like

    # Set this to "no" if pserver shouldn't check system users/passwords
    SystemAuth=yes
    

    Administrivia

    Setting up anonymous read only cvs access

    As the administrator of a group, send email to www@gigascale.org requesting that anonymous read only cvs access be setup for your cvs repository.

    The website maintainers will:

    1. Create a link for your repository in /home/cvs/cvsanon
      cd /home/cvs/cvsanon
      ln -s ../yourrepository .
      
      
    2. Each workgroup should have their own anonymous cvs account so that password administration is easier.
      The accounts are listed in /home/cvs/cvsanon/CVSROOT/passwd and look like
      accountname:encrypted password:cvsanon
      
      cvsanon is the name of the account that we actually log in as.
    3. To generate an encrypted password, run cryptout.pl with the password
      gigasource:root: %C2> /usr/local/bin/cryptout.pl foobar
      oPG6N3As668O2
      gigasource:root: %C2> 
      
      and then placing that encrypted password in a new password entry in /home/cvs/cvsanon/CVSROOT/passwd

    Other details

    Note that anonymous read only cvs access sends passwords over in clear text with a very simple encryption scheme. Thus, this method is really only useful for shared accounts since with individual accounts users tend to use the same password for many different accounts so if their cvs password gets snooped, other accounts could be compromised.

    Note further that the lightly encrypted password is stored in ~/.cvspass.

    Readonly access is controlled by adding users to /home/cvs/cvsanon/CVSROOT/readers

    /etc/services and /etc/inetd.conf were modified with the following:

    gigasource:root: %C2> grep pserver /etc/services
    cvspserver      2401/tcp
    gigasource:root: %C2> grep pserver /etc/inetd.conf
    cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/home/cvs
    /cvsanon pserver
    gigasource:root: %C2>
    
    

    xinetd setup (for Linux)

    To set up xinetd, I created /etc/xinetd.d/cvspserver:
    service cvspserver
    {
            socket_type         = stream
            protocol            = tcp
            wait                = no
            user                = root
            passenv             = PATH
            server              = /usr/bin/env
            server_args         = -i cvs -f --allow-root=/usr2/cvsroot --allow-root
    =/home/real/cvsroot pserver
    }
    
    This also worked:
    service cvspserver
    {
            socket_type         = stream
            protocol            = tcp
            wait                = no
            user                = root
            passenv             = PATH
            server              = /usr/bin/cvs
            server_args         = -f --allow-root=/usr2/cvsroot --allow-root=/home/
    real/cvsroot pserver
    }
    
    Then I did /etc/init.d/xinetd restart

    Solaris 10 Notes

    Under Solaris 10, I set up /etc/inetd.conf as before, but then ran inetconv -e to convert the cvspserver entry.

    Add the following rules to /etc/ipf/ipf.conf

    pass in quick on bge0 proto tcp from any to 128.32.48.234 port = cvspserver flags S keep state group 100
    
    # CVS
    pass out quick on bge0 proto tcp from 128.32.48.234 to any port = cvspserver flags S keep state group 200
    
    Run ipf -F a -f /etc/ipf/ipf.conf

    How do I convert from SCCS or RCS to CVS
    Resources:
  • Cyclic SCCS page
  • CVS/SCCS command comparison
  • University of Houston CVS Manual - includes SCCS conversion notes
  • Converting from SCCS to CVS is not that difficult, there are scripts in the contrib directory that is shipped with the cvs source code. The basic idea is that one backs up the SCCS tree, converts to RCS and then converts to CVS.

    The notes below discuss the conversion of the Ptolemy II SCCS tree to CVS.

  • Use cvs annotate to get the same functionality as sccs get -p -m.
  • When I used it a few years ago, the source tree ended up getting destroyed several times. Before applying CVS to the entire tree, I'd like to have some experience with smaller packages.
  • Converting from SCCS to RCS can be done automatically with sccs2rcs which is shipped in the contrib directory of CVS. Locally, this can be found at /usr/eesww/share/gnu/cvs/lib/cvs/contrib/sccs2rcs.
  • We need to be sure that the makefiles can deal with CVS. Currently, we use $PTOLEMY/bin/safe-get to update SCCS files. I'm not sure how this would work in CVS
  • %W% %G% should be converted to $Id: oldfaq.htm 155 2010-08-09 16:54:27Z cxh $
  • %G% should be converted to $Date: 2010-08-09 09:54:27 -0700 (Mon, 09 Aug 2010) $
  • RCS does not include an equivalent to the SCCS %Q% keyword, so we will have to spend time reconstructing the copyright system. The RCS keywords that cvs uses are listed in rcs.c:
    static const struct rcs_keyword keywords[] =
    {
        { KEYWORD_INIT ("Author") },
        { KEYWORD_INIT ("Date") },
        { KEYWORD_INIT ("Header") },
        { KEYWORD_INIT ("Id") },
        { KEYWORD_INIT ("Locker") },
        { KEYWORD_INIT ("Log") },
        { KEYWORD_INIT ("Name") },
        { KEYWORD_INIT ("RCSfile") },
        { KEYWORD_INIT ("Revision") },
        { KEYWORD_INIT ("Source") },
        { KEYWORD_INIT ("State") },
        { NULL, 0 }
    };
     
  • A CVS training manual says
    SCCS is a file by file revision control system, while CVS is a repository based system. By and large the greatest task in moving from SCCS to CVS is the change in the development mentality from developer controlled source files to a centralised repository based systems. Having said that, the vast majority of SCCS based development sites that I have encountered have already set up a repository of sorts, because doing that is just good SCM practise.

    Some important points to note when converting to CVS from SCCS:

  • CVS requires other programs to do some of its work -- in particular RCS and Diff are required. Although a diff utility is provided with most operating systems, I recommend that you upgrade to GNU diff (version 2.7 or later) in the process of upgrading to CVS.
  • Make sure that you have the latest version of RCS (version 5.7 is recommended).
  • Ensure that the developers and management are informed well in advance of the change. This may be a change of toolset, but it also requires a change of development mentality.
  • In converting from RCS to CVS, make sure that you follow these steps:

  • Create a CVS repository. Within this repository you should create an empty directory structure to hold the RCS files.
  • Keep a backup copy of your SCCS files in their original location just in case there are any mishaps. There is a CVS supplied utility called sccs2rcs that will convert all SCCS files in an SCCS/ directory to RCS files in an RCS/ directory. This performs most of the work in doing the actual file level conversion.
  • Copy the RCS files created by sccs2rcs into the repository using the standard unix file copy utilities (cp -rp is useful, as is tar). During this stage, make sure that you don't lose track of your repository structure.
  • Update the modules file in CVSROOT. This can be updated using cvs co modules or cvs co CVSROOT, editing the modules file, and checking it back in again. You should make sure that there is an entry in the modules file for every directory (top level and subdirectory) in the repository.
  • Test the change by attempting to cvs co a few of the new modules you have created, and running cvs log or cvs status on some of the files you have checked out.
  • It may pay to perform some pre-planning for the above steps in this order:

  • Create the CVSROOT directory structure in advance. Create and update a modules file so that you know what directory structure you are working towards. Print out a copy of this structure and keep it handy -- a diagram or two showing the directory tree structure may be useful here, both to the SCM staff and the developers.
  • sccs2rcs is a lengthy process. If you have an existing repository of SCCS files, you may be able to create a script to do both the sccs2rcs conversion and moving the subsequently created RCS files into the repository. Run sccs2rcs a few times on test files so that you know what it does.
  • Converting from RCS to CVS

    Once you've converted from SCCS to RCS, you need to convert from RCS to CVS.

    The CVS info documentation says:

    From RCS
     

    If you have been using RCS, find the RCS files--usually a file named `foo.c' will have its RCS file in `RCS/foo.c,v' (but it could be other places; consult the RCS documentation for details). Then create the appropriate directories in CVS if they do not already exist. Then copy the files into the appropriate directories in the CVS repository (the name in the repository must be the name of the source file with `,v' added; the files go directly in the appopriate directory of the repository, not in an `RCS' subdirectory). This is one of the few times when it is a good idea to access the CVS repository directly, rather than using CVS commands. Then you are ready to check out a new working directory.

    The RCS file should not be locked when you move it into CVS; if it is, CVS will have trouble letting you operate on it.

    A CVS training manual says:

    9.1 Moving from RCS to CVS

    Migration from RCS to CVS is a relatively painless process. CVS uses RCS for all of its file level version control, and so RCS files can be directly copied into a CVS repository.

    In converting from RCS to CVS, make sure that you follow these steps:

  • Create a CVS repository. Within this repository you should create an empty directory structure to hold the RCS files.
  • Keep a backup copy of your RCS files in their original location just in case there are any mishaps.
  • Copy the files into the repository using the standard unix file copy utilities (cp -rp is useful, as is tar).
  • Update the modules file in CVSROOT. This can be updated using cvs co modules or cvs co CVSROOT, editing the modules file, and checking it back in again. You should make sure that there is an entry in the modules file for every directory (top level and subdirectory) in the repository.
  • Test the change by attempting to cvs co a few of the new modules you have created, and running cvs log or cvs status on some of the files you have checked out.
  • Steps to convert one directory from SCCS to CVS

    1. sccs2rcs
    2. co RCS/*

    Steps to convert a tree from SCCS to CVS

    1. Cleanup, removing .class files and codeDoc
      make distclean
      cd ptolemy
      find . -name "*.class" -exec rm {} \;
      find . -name "*codeDoc" -exec rmdir {} \;
      
    2. Be sure that there are no files checked out
      cd ~ptII
      make sccsinfo
      
      /users/ptII/adm/cvs/unsccsedit might help for testing
    3. You may want to remove all the extra sccs files that are not being used. One way to do this is to do a sccs get SCCS in all the directories and then run make checkjunk and move the SCCS files to a junk directory.
    4. The following script located at /users/ptII/adm/cvs/getallsccs will get all the SCCS files
      #!/bin/sh
      homedir=`pwd`
      dirs=`find . -name SCCS -print`
      for dir in $dirs
      do
      	echo $dir
      	cd $homedir
      	cd $dir/..
      	sccs get SCCS
      done
      
      	
    5. The run make checkjunk
    6. If you place the output of make checkjunk into a file, then run the script below to generate another script that will move the junk files into a junk directory.
      #!/bin/sh
      
      grep 'Extra files' sccsfiles | sed 's@Extra files in /export/carson/carson2/cxh/tmp/ptII/@@' | sed 's/://' |
      awk '  { print "mkdir -p /users/cxh/tmp/junk/"$1"/SCCS"
      	for(i=2;i<=NF;i++) {
      		print "mv "$1"/SCCS/s."$i" /users/cxh/tmp/junk/"$1"/SCCS"
      		print "mv "$1"/"$i" /users/cxh/tmp/junk/"$1
      	}
      }
      
      
    7. Repeat running make checkjunk the script above and the output script until make checkjunkfinds no garbage:
      	make checkjunk >> sccsfiles
      	moveoldsccs > moveoldsccs.sh
      	sh moveoldsccs.sh
      	
      and repeat
    8. Convert from SCCS to RCS:
      /users/ptII/adm/sccs2cvs/sccs2rcsall -q
      
      sccs2rcsall is a locally modified version of contrib/sccs2rcs that is shipped with the cvs sources. The version that is shipped with cvs has y2k hacks not present in the local copy, so use the most current version from the cvs sources.
    9. Check that there are no SCCS directories:
      find . -name SCCS -ls
      
      
      If there are any, fix the problems and rerun sccs2rcsall
    10. Check out all the files from RCS
      /users/ptII/adm/sccs/2cvs/coall
      
      coall looks like:
      #! /bin/sh
      # Check out all the files from RCS in a tree
      dirs=`find . -xdev -type d | egrep -v "SCCS|adm|RCS|CVS|codeDoc"`
      homedir=`pwd`
      for dir in $dirs
      do
              echo $dir
              cd $dir
              co RCS/*
              cd $homedir
      done
      
    11. Initialize the repository
      setenv CVSROOT ~/tmp/ptII/Repository
      cvs init
      
    12. Convert from RCS to CVS
      cd ptII
      /users/ptII/adm/cvs/ptrcs-to-cvs ptII
      
      ptrcs-to-cvs is a version of cvs-1.11/contrib/rcs-to-cvs with the following changes:
      cxh@maury 67% diff -c ~/src/cvs-1.11/contrib/rcs-to-cvs ptrcs-to-cvs
      *** /home/eecs/cxh/src/cvs-1.11/contrib/rcs-to-cvs      Mon Sep 25 18:59:01 200\
      0
      --- ptrcs-to-cvs        Thu Nov 12 14:01:25 1998
      ***************
      *** 90,96 ****
      
        if [ -d SCCS ]; then
            echo SCCS files detected! >&2
      !     exit 1
        fi
        if [ -d RCS ]; then
            co RCS/*
      --- 90,97 ----
      
        if [ -d SCCS ]; then
            echo SCCS files detected! >&2
      !     #exit 1
      !     exit 0
        fi
        if [ -d RCS ]; then
            co RCS/*
      ***************
      *** 99,105 ****
        for name in * .[a-zA-Z0-9]*
        do
            case "$name" in
      !     RCS | *~ | \* | .\[a-zA-Z0-9\]\* ) continue ;;
            esac
            echo $name
            if [ $vbose -ne 0 ]; then
      --- 100,106 ----
        for name in * .[a-zA-Z0-9]*
        do
            case "$name" in
      !     Repository | RCS | SCCS | old-SCCS | adm | codeDoc | *~ | \* | .\[a-zA-Z0\
      -9\]\* ) continue ;;
            esac
            echo $name
            if [ $vbose -ne 0 ]; then
      ***************
      *** 158,171 ****
                              echo "MSG: Copying old rcs file."
                              cp RCS/"${name}",v "$file"
                      else
      !                   if [ -n "${comment}" ]; then
      !                       rcs -q -i -c"${comment}" -t${message_file} -m'.' "$file\
      "
      !                   fi
      !                   ci -q -u1.1 -t${message_file} -m'.' "$file"
      !                   if [ $? -ne 0 ]; then
      !                       echo "ERROR: Initial check-in of $file failed - abortin\
      g" >&2
      !                       exit 1
      !                   fi
                      fi
                  else
                      file="${update_dir}/Attic/${name},v"
      --- 159,174 ----
                              echo "MSG: Copying old rcs file."
                              cp RCS/"${name}",v "$file"
                      else
      !                   echo "MSG: not checking in $name, since it is not in RCS"
      !
      !                   #if [ -n "${comment}" ]; then
      !                   #    rcs -q -i -c"${comment}" -t${message_file} -m'.' "$fil\
      e"
      !                   #fi
      !                   #ci -q -u1.1 -t${message_file} -m'.' "$file"
      !                   #if [ $? -ne 0 ]; then
      !                   #    echo "ERROR: Initial check-in of $file failed - aborti\
      ng" >&2
      !                   #    exit 1
      !                   #fi
                      fi
                  else
                      file="${update_dir}/Attic/${name},v"
      
      

    I got "Failed to connect after 6 attempts . . ."
    If you use CVS several times in succession, then you may see a message like
    Failed to connect after 6 attempts, try again in a few minutes or use
        '-oConnectionAttempts 1000'
        cvs [update aborted]: end of file from server (consult above messages if
        any)
    
    The reason that this occurs is because Windoze does not close sockets promptly. The fix is to create or edit c:/ssh/etc/ssh_config and add
    Host *
         ConnectionAttempts 100
    

    cvs update is slow
    There are many reasons why cvs update could be slow.

    Network Connectivity

    The most common reason for CVS to misbehave is poor network connectivity. If you have DSL, see the DSL Troubleshooting FAQ. Below are some things to try:
    • Reboot - Often the quickest solution.
    • In a separate window, trying pinging gigasource while running the cvs command, and then hit Control-C and look for dropped packets in the output.
      ping -t gigasource
      
      SSH has a hard time with packet loss greater than 3%.
    • Be sure that names are properly being resolved, try
      nslookup gigasource
      
    • Sometimes it seems like starting over and checking out a new tree is necessary. This is especially true if you have been having network connectivity problems because of dropped packets.
    • (A long shot): If no packets are getting through and your machine is usually on the UCB EECS 171 network and now you are at home connected via modem, then you might have route problems where your machine is routing 171 net packets to the ethernet port instead of the modem. If this is the case and you are connected via modem, run
      route print
      
      and be sure that you have no 171 network entries.

    CVS

    • Use cvs -t update to get a trace and see what cvs is doing. CVS may appear to hang if you it is updating a large file.
    • CVS can use compression, see the -z flag. You can force CVS to always use compression if you have a ~/.cvsrc file that looks like
      cvs -z 9
      update -P -d
      
      The cvs -z 9 uses compression when ever you run any cvs command.
      While you are setting up a ~/.cvsrc file, add update -P -d. This causes cvs update to Prune empty directories and create new d directories. Note that the -d in cvs update -P -d is different than the -d in cvs -d :ext:gigasource.eecs.berkeley.edu:/home/cvs
    • Be sure that CVS_RSH is set to ssh.
      Under bash, if you installed the CHESS CVS for Windows distribution, you will see something like:
      $ echo $CVS_RSH
      C:\Program Files\Ptolemy\CVS SSH\ssh.exe
      
    • Be sure that HOME is set to your home directory.

    SSH

    • Verify that ssh is working with ssh -v gigasource cvs --help

    How do I set it up so that I get email whenever someone commits a change?
    To set up email for CVS or Subversion:
    • Email will be set to people with developer accounts in a workgroup. To enable the developer choice, the admin of the workgroup should go to Admin -> Group Profile and select Software Project
    • the admin of the workgroup should go to the Admin->Configure Group page and click on the CVS mail list checkbox
    • then hit the Change group configuration button at the bottom. This will send email to the CHESS website managers who will create the mailing list and edit the loginfo file.

    If a workgroup member would like to get email about cvs changes, they should go to Options -> Membership and request a Developer account for the corresponding workgroup.

    (Website managers: the instructions for what to do for CVS are in the Infrax FAQ: How do I set up cvs mail?
    or in the dopsysadmin: How do I set up CVS mail?
    For Subversion, see Setting up SVN Email)

    See also How do I send commit log messages to a mailing list?
    and E-mail Notifications

    Cygwin copy and paste
    You may need to enable copy and paste in the bash shell window.

    If copy and paste are working properly, then you should be able to highlight text by left clicking and dragging the mouse over the text and then hitting the Enter key to copy the highlighted text.

    The Cygwin faq at http://www.cygwin.com/faq/faq.html#SEC54 says:

    How can I copy and paste into Cygwin console windows?

    Under Windows NT, open the properties dialog of the console window. The options contain a toggle button, named "Quick edit mode". It must be ON. Save the properties.

    Under Windows 9x, open the properties dialog of the console window. Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.

    You can also bind the insert key to paste from the clipboard by adding the following line to your .inputrc file:

        "\e[2~": paste-from-clipboard
    
    More precisely:
    1. Start up bash by doing Start -> Programs -> Cygwin -> Cygwin Bash\ Shell.
    2. Right click on the icon in the upper left of the title bar and select properties
    3. Under Options, select 'QuickEdit Mode', hit ok
    4. Select 'Modify shortcut that started this window', hit ok

    To copy from a Cygwin Bash window, highlight the text by left clicking and dragging the mouse, then hit the enter key to copy the text.

    To paste into a Cygwin Bash window, click on the icon in the upper left of the window menu bar and then do edit -> paste or do Alt-Space e p That is, hold down the Alt key, hit the space bar, let up on the Alt key, type an e and then a p.

    Is there a web interface to the CVS repository
    No, there is no webcvs view. The basic issue is that it is tricky to integrate a web server based solution into our current permission scheme on the website. Using a full blown client that uses ssh to access the repository is probably better than using a client on the web server.

    Jorn Janneck wrote:

    it seems that these days there are a number of decent user interfaces to cvs. intellij, e.g., has a very nice cvs integration, including visual display of conflicts, and i hear that so does eclipse (never tried it with cvs myself), and i think jbuilder. of course, these are programming ides---if that is too heavy, i believe that there are a number of graphical cvs-only frontends, which i never used though, because i am very happy with intellij. a list of those can be found here: http://www.wincvs.org/

    SVN vs CVS
    I've not set up a SVN repository, I'm sure it is fairly easy. I have set up a CVS repository. Setting up CVS is very easy. If people have ssh access to the repository, then you are done. Setting up anonymous access (pserver) is not that hard. See anonymous access

    Lots of people swear by SVN and swear at CVS. One issue is that I'm not so sure Eclipse supports SVN out of the box, though there is the subclipse plugin. That's what stops me from switching.

    In general, one issue I've found is that people tend to jump to the newest technology for odd reasons. Yes, the CVS command line and branching mechanism sucks and SVN is "better". However, are you willing to toss access via Eclipse out of the box if you go with SVN? I'm sure there is a SVN interface to Eclipse, but why make installation even more complicated for users who are already struggling?

    I think it is better to set up CVS or SVN on a Linux box than a Windows box. One issue is that the Windows so called file system is case insensitive, case preserving, which means that if under Unix there are two filenames differing only in case, then god knows what happens if the CVS or SVN server is on Windows.

    How do I use CVS on the Mac under OSX
    To use CVS on the Macintosh, you should install Xcode, which is about 1 gig in size!.

    Other resources:

    You are not logged in 
    ©2002-2014 Chess