This is a test site. Any changes will be lost!

CVS for Administrators: Difference between revisions

From MoodleDocs
 
(62 intermediate revisions by 22 users not shown)
Line 1: Line 1:
The [http://moodle.cvs.sourceforge.net/moodle/moodle/ CVS archive] contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.
The [http://cvs.moodle.org/ CVS archive] contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.


[[Image:Cvstree.png|CVS tree]]
[[Image:Cvstree.png|CVS tree]]


Developers may have selective write access to the Moodle CVS archive using their Sourceforge username and password (see [[CVS for Developers]] for details about how to do this). However, most people only need read-only access, so they can just connect using '''anonymous CVS''' as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS.  
Developers may have selective write access to the Moodle CVS archive (see [[CVS for Developers]] for details about how to do this). However, most people only need read-only access, so they can just connect to one of the mirrors using '''anonymous CVS''' as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS.  


==CVS Servers==
==CVS Servers==


Until 25th April 2007, we only had one server available for anonymous CVS (moodle.cvs.sourceforge.net).  Unfortunately this server is now disabled.
Please choose the closest CVS mirror server to you from this list:
 
Since then we have a growing list of CVS mirror servers around the world.  Please choose the closest server to you from this list:


{| border="1" cellpadding="4" cellspacing="0"
{| border="1" cellpadding="4" cellspacing="0"
Line 18: Line 16:
|EU
|EU
|'''eu.cvs.moodle.org'''
|'''eu.cvs.moodle.org'''
|Antonio Vicent and Eloy Lafuente (until more servers arrive - name will remain stable, don't worry)
|[http://www.open.ac.uk/ The Open University] In case of trouble, contact [mailto:r.t.c.norfor@open.ac.uk Rod Norfor] or [mailto:d.a.woolhead@open.ac.uk Derek Woolhead]
|-
|-
|ES
|ES
|'''es.cvs.moodle.org'''
|'''es.cvs.moodle.org'''
|[http://www.mondragon.edu/ Mondragon Unibertsitatea]
|[http://www.mondragon.edu/ Mondragon Unibertsitatea] In case of trouble, contact [mailto:iarenuno@eteo.mondragon.edu iarenuno@eteo.mondragon.edu] or [mailto:iarenaza@escomposlinux.org iarenaza@escomposlinux.org]
|-
|-
|UK
|UK
|'''uk.cvs.moodle.org'''
|'''uk.cvs.moodle.org'''
|Cumbria and Lancashire Education Online ([http://www.cleo.net.uk/ CLEO]) in collaboration with Lancaster University Network Services ([http://www.lancs.ac.uk/ LUNS])
|Cumbria and Lancashire Education Online ([http://www.cleo.net.uk/ CLEO]) in collaboration with Lancaster University Network Services ([http://www.luns.net.uk/ LUNS])
|-
|US
|'''us.cvs.moodle.org'''
|San Francisco State University, Academic Technology ([http://www.sfsu.edu/ SFSU]). In case of trouble, contact [mailto:ilearn@sfsu.edu iLearn support]
|-
|US
|'''us2.cvs.moodle.org'''
|[http://www.contractorsinstitute.com The Contractors Institute] pserver and viewvc. In case of trouble contact [mailto:cvs@contractorsinstitute.com network support].
|}
|}


Line 32: Line 38:
Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!
Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!


(If you would like to contribute to the project by running a mirror, please see [[How to set up a CVS mirror]])
For up-to-date alerts about planned or unplanned outages on any of these servers subscribe to the [http://lists.moodle.org/info/outages Moodle Outage mailing list].
 
(If you would like to contribute to the project by running a mirror, please see [[How to set up a CVS mirror]])


===Switching to a new server===
===Switching to a new server===
Line 40: Line 48:
====Switching to a new server on Unix====
====Switching to a new server on Unix====


Use a shell command like this to change existing installations to point to the UK mirror is:
Use a shell command like this to change existing installations to point to the new mirror (UK mirror used in this example):


  '''find . -type f -name Root -print0 | xargs -0 perl -pi -e 's/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/''''
  '''find . -type f -name Root -print0 | xargs -0 perl -pi -e 's/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/''''
Line 57: Line 65:


It takes a few seconds to go through all of the '''cvs''' folders and update the '''root''' files.
It takes a few seconds to go through all of the '''cvs''' folders and update the '''root''' files.
By the way, if you don't want to install WinCVS, another way of doing this is to uninstall your TortoiseCVS client on Windows, then do a regedit to clean up all the tortoisecvs related entries (might not be necessary), then reinstall TortoiseCVS client again (a good reason to upgrade to the most recent version of TortoiseCVS!). I have tested this and it cleared up the original setting of the original anonymous CVS server setting.


==Instructions==
==Instructions==
Line 62: Line 72:
===From a Unix computer===
===From a Unix computer===


To connect and login for the first time to the CVS server, you can use this command:
To connect and login for the first time to the CVS server, you can use this command (remember to replace '''SERVER.cvs.moodle.org''' in the instructions below with the mirror server you chose above):


  cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login
  cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login
Line 68: Line 78:
There is no password - when asked for one, just hit Enter.
There is no password - when asked for one, just hit Enter.


To checkout (download) the entire Moodle code for the first time, use this command to get the latest STABLE version:
To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):


  cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_18_STABLE moodle
  cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle


Or the latest development version:
Or the latest development version (not for production use):


  cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co moodle
  cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle


Or the modules in Contrib
Or the modules in Contrib
Line 84: Line 94:
  cvs update -dP
  cvs update -dP


To update your local copy of Moodle to a new version (e.g. from 1.7+ to 1.8), go into your local Moodle directory and type:
To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:
 
cvs update -dP -r MOODLE_19_STABLE
 
To update your local copy and to save the log of the process, use the following command instead the previous one:
 
cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log
 
Then look at the upgrade.log, notably look for lines starting with "C" (conflict):
 
grep '^C' upgrade.log
 
Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See [[CVS for Developers]] for more details.
 
===Changing the directory name===
 
By default, the CVS checkout creates a diectory on your webserver called 'moodle'. If you want your Moodle installation in a different directory, you can change the name of the directory that it will checkout the files to, by typing the follwing. This would download the MOODLE_19_STABLE branch into a directory called "mydirectory" (-d mydirectory).
 
cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P '''-d mydirectory''' -r MOODLE_19_STABLE moodle
 
Or the latest development version to a directory called 'moodle-dev':
 
cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P '''-d moodle-dev''' moodle
 
You can also change the name of the directory after the files are downloaded, and before you go through the Moodle install process. If you change the name of the directory before install, it will not affect anything during the install or during a CVS update. If you change the name of the directory after an install, you will need to change the config.php to reflect the name change ([[Moodle_migration#Migrating_a_complete_Moodle_site|guidance here]]). It won't affect the CVS update though.
 
===Change directory owner===


cvs update -dP -r MOODLE_18_STABLE
Depending on your webserver setup, you may well need to change the owner of the directory to the webserver user. Follow this step if you get permissions error when you try to access the page. For apache:
 
  chown -R www-data:www-data moodle


===From a Windows computer===
===From a Windows computer===


To get started with a fresh copy of Moodle, follow the following steps:
To get started with a fresh copy of Moodle, follow the following steps (remember to replace  '''SERVER.cvs.moodle.org''' in the instructions below with the mirror server you chose above):[[Image:CVS moodle settings for tortoise CVS.jpg|thumb|Tortoise CVS Screen capture]]
 
[[Image:Ecran cvs.jpg|thumb|Tortoise CVS (real name) Screen capture]]
# Get TortoiseCVS from [http://www.tortoisecvs.org/ tortoisecvs.org] and install it, then reboot.
# Get TortoiseCVS from [http://www.tortoisecvs.org/ tortoisecvs.org] and install it, then reboot.
# Find or create a new folder somewhere where you want Moodle to be downloaded to.
# Find or create a new folder somewhere where you want Moodle to be downloaded to.
# Right-mouse-click that folder and choose "CVS Checkout" from the menu. You should see a dialog box. [[Image:CVS moodle settings for tortoise CVS.jpg|thumb|Tortoise CVS Screen capture]]
# Right-mouse-click that folder and choose "CVS Checkout" from the menu. You should see a dialog box.  
# Copy this text into the CVSROOT field: <code>:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle</code>
# Copy this text into the CVSROOT field: <code>:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle</code>
#* NOTE - replace "SERVER" with "eu", "es", "uk" or "us" depending on your location.
# Under the "Module" field, type "moodle" to get moodle. (Other options here include"contrib" to get the contrib directory of hacks and addons, or "mysql" to get the optional MySQL Admin module).
# Under the "Module" field, type "moodle" to get moodle. (Other options here include"contrib" to get the contrib directory of hacks and addons, or "mysql" to get the optional MySQL Admin module).
#* For the latest STABLE version, click on the "Revision" tab and then check the radio button labelled "Choose branch or tag". From the drop-down menu select MOODLE_18_STABLE.
#* For the latest STABLE version, click on the "Revision" tab and then check the radio button labelled "Choose branch or tag". From the drop-down menu select MOODLE_18_STABLE.
Line 105: Line 144:


Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.
Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.
'''NOTE.-''' Admins with a developer account on cvs.moodle.org can connect with their account name, see attached screen shot.


===From a Mac OS X computer===
===From a Mac OS X computer===
You will find some information about CVS and Mac OS X  in the documentation for the complete installation package Moodle4Mac. Please read [[Complete_Install_Packages_for_Mac_OS_X#How_To_Update_Your_Moodle4Mac | How To Update Your Moodle4Mac]]. It works fine with the new CVS servers.
You will find some information about CVS and Mac OS X  in the documentation for the complete installation package Moodle4Mac. Please read [[Complete_Install_Packages_for_Mac_OS_X#How_To_Update_Your_Moodle4Mac | How To Update Your Moodle4Mac]]. It works fine with the new CVS servers.
===Troubleshooting===
If you see something like this, make sure that there is not some firewall blocking the port (it's 2401):
$ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login
Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle
CVS password:
cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out


==See also==
==See also==


*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=26731&parent=125858 Using cvs] forum posting
*[[Development:Setting up Eclipse]] for step by step instructions for setting up the [http://www.eclipse.org/ Eclipse IDE] for Moodle development, which including how to do the necessary CVS operations
*[[Development:Setting up Eclipse]] for step by step instructions for setting up the [http://www.eclipse.org/ Eclipse IDE] for Moodle development, which including how to do the necessary CVS operations.
* [[Development:Tracking Moodle CVS with git]]
Using Moodle forum discussions:
*[http://moodle.org/mod/forum/discuss.php?d=26731&parent=125858 Using cvs]
*[http://moodle.org/mod/forum/discuss.php?d=91891 CVS Updating of 3rd-Party Plug-ins in the Moodle folder itself]
*[http://moodle.org/mod/forum/discuss.php?d=108196 simple question for cvs]


[[Category:Administrator]]
[[Category:Administrator]]
[[fr:CVS pour administrateurs]]
[[ja:管理者用CVS]]

Latest revision as of 12:14, 14 November 2008

The CVS archive contains all the source code for Moodle. You can use a CVS program to extract versions ranging from the most stable release to the most cutting-edge development version. CVS can be an extremely convenient way of maintaining a Moodle server.

CVS tree

Developers may have selective write access to the Moodle CVS archive (see CVS for Developers for details about how to do this). However, most people only need read-only access, so they can just connect to one of the mirrors using anonymous CVS as described below. There can however currently be a delay of up to 1 hour between the time a developer commits changes to developer CVS and the time it becomes available on anonymous CVS.

CVS Servers

Please choose the closest CVS mirror server to you from this list:

Country Server Provided by
EU eu.cvs.moodle.org The Open University In case of trouble, contact Rod Norfor or Derek Woolhead
ES es.cvs.moodle.org Mondragon Unibertsitatea In case of trouble, contact iarenuno@eteo.mondragon.edu or iarenaza@escomposlinux.org
UK uk.cvs.moodle.org Cumbria and Lancashire Education Online (CLEO) in collaboration with Lancaster University Network Services (LUNS)
US us.cvs.moodle.org San Francisco State University, Academic Technology (SFSU). In case of trouble, contact iLearn support
US us2.cvs.moodle.org The Contractors Institute pserver and viewvc. In case of trouble contact network support.


Replace the SERVER.cvs.moodle.org in the instructions below with the server you chose above!

For up-to-date alerts about planned or unplanned outages on any of these servers subscribe to the Moodle Outage mailing list.

(If you would like to contribute to the project by running a mirror, please see How to set up a CVS mirror)

Switching to a new server

If you were already using CVS and want to switch to a different server, you'll probably need to make a small change so that the control files in your working copy will point to the new mirrors.

Switching to a new server on Unix

Use a shell command like this to change existing installations to point to the new mirror (UK mirror used in this example):

find . -type f -name Root -print0 | xargs -0 perl -pi -e 's/\@moodle\.cvs\.sourceforge\.net/\@uk\.cvs\.moodle\.org/'

It can be run from /home, say, to fix multiple sites at once.

Switching to a new server with TortoiseCVS

If you were already using Tortoise CVS on Windows it's tricky, because Tortoise doesn't have any interface for changing the server. http://www.tortoisecvs.org/faq.html#changecvsroot explains it. But basically,

1) Install WinCVS and launch it. 
2) Navigate to and select your Moodle folder. 
3) Choose 'Macros'->CVS->Change Root from the menu.  
4) Accept (or change) the default for the 'old' server. 
5) Type the new server name. OK!  

It takes a few seconds to go through all of the cvs folders and update the root files.

By the way, if you don't want to install WinCVS, another way of doing this is to uninstall your TortoiseCVS client on Windows, then do a regedit to clean up all the tortoisecvs related entries (might not be necessary), then reinstall TortoiseCVS client again (a good reason to upgrade to the most recent version of TortoiseCVS!). I have tested this and it cleared up the original setting of the original anonymous CVS server setting.

Instructions

From a Unix computer

To connect and login for the first time to the CVS server, you can use this command (remember to replace SERVER.cvs.moodle.org in the instructions below with the mirror server you chose above):

cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login

There is no password - when asked for one, just hit Enter.

To checkout (download) the entire Moodle code for the first time, use this command to get the latest WEEKLY version (generally the latest, most bug free version):

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_19_WEEKLY moodle

Or the latest development version (not for production use):

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P moodle

Or the modules in Contrib

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co contrib

Later, to update your local copy of Moodle to the current version in CVS you just need to go into your local Moodle directory and type:

cvs update -dP

To update your local copy of Moodle to a new version (e.g. from 1.8+ to 1.9), go into your local Moodle directory and type:

cvs update -dP -r MOODLE_19_STABLE

To update your local copy and to save the log of the process, use the following command instead the previous one:

cvs update -dP -r MOODLE_19_STABLE | tee upgrade.log

Then look at the upgrade.log, notably look for lines starting with "C" (conflict):

grep '^C' upgrade.log

Conflicts may appear in case you have manually modified your source files. You have to resolve conflicts before using the site. See CVS for Developers for more details.

Changing the directory name

By default, the CVS checkout creates a diectory on your webserver called 'moodle'. If you want your Moodle installation in a different directory, you can change the name of the directory that it will checkout the files to, by typing the follwing. This would download the MOODLE_19_STABLE branch into a directory called "mydirectory" (-d mydirectory).

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -d mydirectory -r MOODLE_19_STABLE moodle

Or the latest development version to a directory called 'moodle-dev':

cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -d moodle-dev moodle

You can also change the name of the directory after the files are downloaded, and before you go through the Moodle install process. If you change the name of the directory before install, it will not affect anything during the install or during a CVS update. If you change the name of the directory after an install, you will need to change the config.php to reflect the name change (guidance here). It won't affect the CVS update though.

Change directory owner

Depending on your webserver setup, you may well need to change the owner of the directory to the webserver user. Follow this step if you get permissions error when you try to access the page. For apache:

 chown -R www-data:www-data moodle

From a Windows computer

To get started with a fresh copy of Moodle, follow the following steps (remember to replace SERVER.cvs.moodle.org in the instructions below with the mirror server you chose above):

Tortoise CVS Screen capture
Tortoise CVS (real name) Screen capture
  1. Get TortoiseCVS from tortoisecvs.org and install it, then reboot.
  2. Find or create a new folder somewhere where you want Moodle to be downloaded to.
  3. Right-mouse-click that folder and choose "CVS Checkout" from the menu. You should see a dialog box.
  4. Copy this text into the CVSROOT field: :pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle
    • NOTE - replace "SERVER" with "eu", "es", "uk" or "us" depending on your location.
  5. Under the "Module" field, type "moodle" to get moodle. (Other options here include"contrib" to get the contrib directory of hacks and addons, or "mysql" to get the optional MySQL Admin module).
    • For the latest STABLE version, click on the "Revision" tab and then check the radio button labelled "Choose branch or tag". From the drop-down menu select MOODLE_18_STABLE.
    • If you don't see the very latest version in the long drop-down list under Branch or tag name, click the Update List button next to it and wait for the list to be updated.
    • For the latest UNSTABLE development version, the radio-button "Use HEAD branch" in the Revision tab should be checked.
  6. Press the button: "OK" and everything should be downloaded.

Later, to update your local copy of Moodle to the current version in CVS, just right-mouse-click the folder and choose "CVS Update".

Note that the enclosing moodle folder is self-contained - you can move it anywhere you like or even rename it.




NOTE.- Admins with a developer account on cvs.moodle.org can connect with their account name, see attached screen shot.

From a Mac OS X computer

You will find some information about CVS and Mac OS X in the documentation for the complete installation package Moodle4Mac. Please read How To Update Your Moodle4Mac. It works fine with the new CVS servers.

Troubleshooting

If you see something like this, make sure that there is not some firewall blocking the port (it's 2401):

$ cvs -d:pserver:anonymous@us.cvs.moodle.org:/cvsroot/moodle login
Logging in to :pserver:anonymous@us.cvs.moodle.org:2401/cvsroot/moodle
CVS password:
cvs [login aborted]: connect to us.cvs.moodle.org(130.212.64.111):2401 failed: Connection timed out

See also

Using Moodle forum discussions: