# Zugang und Nutzung des CVS

> Das CVS bietet den Zugang zu den aktuellen Entwicklerversionen von Moodle. Die Anleitung zur Nutzung des CVS wird nicht ins Deutsche übersetzt.

## Using CVS to access and update Moodle source code

> CVS is the Concurrent Versioning System. It's a commonly used way of storing source code because it keeps versions of all files so that nothing is ever lost, and usage by different people is tracked. It also provides ways to merge code if two or more people are working on the same file. All code and all versions are stored on a central server (in this case, at Sourceforge).

> To use Moodle's CVS archive (as a developer with write access), you first need to have an account on Sourceforge. For the examples on this page, let's assume your username is myusername and your password is mypassword. Once you have a Sourceforge account, contact me (Martin Dougiamas) so I can give you write access to particular directories.

> To avoid being prompted for mypassword every time you run a CVS command, follow the Sourceforge directions for using authorized keys. This step is optional, but it can make your CVS experience a lot nicer.

> With that done, you should have all the permissions you need, so you just need to set up your machine and download the current sources so you can start working on them. Below are instructions for Unix and Windows systems.

> ### 1. Using CVS on Unix

> > Sourceforge CVS uses ssh as a transport layer for security, so you will have to set this CVS_RSH environment variable in your Unix shell:

> > >     setenv CVS_RSH ssh (for csh, tcsh etc)

> > >     export CVS_RSH=ssh (for sh, bash etc)

> > It's best to put this in your .bashrc or .cshrc so you don't have to type it all the time. Then, check out Moodle using this (all one line):

> > >     cvs -z3 -d:ext:myusername@cvs.sourceforge.net:/cvsroot/moodle co moodle

> > Don't try to do run this first CVS command into an existing moodle directory - start fresh with a new directory.

> > Note that you will be prompted for mypassword for each command unless you set up authorized keys

> > Now, you should have a new 'moodle' directory. You can rename it and move it around if you like. Go into it:

> > >     cd moodle

> > All the latest Moodle files should be in there. You can now change files in your copy. To compare your files against the main CVS copy on the server use cvs diff, eg:

> > >     cvs diff -c config-dist.php
> > >     cvs diff -c lang

> > To fetch the latest updates from the server use:

> > >     cvs update -dP

> > To copy your new files back to the server you would do something like:

> > >     cd lang/ca
> > >     cvs commit

> > You will be prompted to add some comments (depends on your default text editor) ... add a meangingful comment and close the editor ... the files will be sent to Sourceforge and stored. Done!

> > To save more time you can put default arguments into a file called .cvsrc in your home directory. For example, mine contains:

> > >     diff -c
> > >     update -dP

> > Try 'cvs help' for more details ...

> ### 2. Using CVS on Windows

> > These instructions are based on notes provided by Mitsuhiro Yoshida <mits@mitstek.com>.

> > Firstly, download and install WinCVS.

> > > https://sourceforge.net/project/showfiles.php?group_id=10072

> > Secondly, download sfsetup for SourceForge ssh access, install it and reboot Windows.

> > > http://sourceforge.net/projects/sfsetup/

> > Next, configure WinCVS. Launch it, and select Admin -> Preferences. Then change them as follows:

> > > [General]
> > > CVSROOT data:
> > > Authentication: ssh
> > > Path: /cvsroot/moodle
> > > Host address: cvs.sourceforge.net
> > > User name: myusername
> > > CVSROOT: myusername@cvs.sourceforge.net:/cvsroot/moodle

> > > [Globals]
> > > Checkout read-only: uncheck
> > > Supply control when adding files: check
> > > Quiet mode: uncheck
> > > TCP/IP compression: check and select 9
> > > Dirty files support: check
> > > Prune(remove) empty directories: check
> > > Disable splash screen: uncheck

> > Congratulations, WinCVS is set up. Now, you should check out a complete working copy of the Moodle course code:

> > 1. Select 'Create -> checkout'
> > 2. For the setting 'Module name and path on the server", type "moodle", then click OK.
> > 3. Type in mypassword and press Enter in the DOS window.

> > After this first checkout, you can fetch updated files from the CVS server like this:

> > 1. Select folders or files you want to update
> > 2. Press right mouse button and select 'Update selection'
> > 3. Press OK button
> > 4. Type in mypassword and press Enter in the DOS window.

> > After modifying files, you can commit them back to the CVS server like this:

> > 1. Select folders or files you want to commit
> > 2. Press right button and select 'Commit selection'
> > 3. Press OK button
> > 4. Type in a meaningful comment and press OK button.
> > 5. Type in mypassword and press Enter in the DOS window.

> Good luck!

Moodle Documentation

Version: $Id: features.html,v 1.2 2001/12/09 10:34:19 martin Exp $