Explain CVS to me

Explain CVS to me

删除的用户 -
回帖数:12

Can somebody explain what CVS is, and how it works?

It appears to me, that it has something to do with AUTOMATICALLY upgrading to the newest version on a daily basis, but a few more details would be appreciated.

Thanks

回复删除的用户

Re: Explain CVS to me

Jon Bolton -
Testers的头像

Jeff, there's quite a good explanation at http://docs.moodle.org/en/CVS_for_Administrators, but in essence, CVS is the version control system/repository that the developers use to commit changes to the Moodle code.

From an end-user Moodle Administrator point of view, we have no permissions to write files to the repository but we can connect it on a read-only basis to download the files. The repository is mirrored to a number different servers around the world, so you should be able to choose the one nearest to you.

You need a 'client application' to connect to the repository - I use Putty but some people use Tortoise.

I connect via Putty to my server [you'll need to ensure they support access via SSH] and type the command to update (more details here). It works the same as a manual update, just a lot easier! I have to say from a UK perspective (ie. using the UK mirror) that upgrading via CVS takes about 15 seconds, rather than the hour or so doing the same by FTP.

I don't do it 'automatically' but I can't think of a reason why it couldn't be run as a batch/scheduled job.

回复Jon Bolton

Re: Explain CVS to me

删除的用户 -

Okay, thanks... it's not as "mysterious" as I thought.

Another couple questions though...

Can I do a fresh brand new install from CVS?

Do I just need to run the CHECKOUT command from Putty in the directory I want to put it in?

Do I need to run the LOGIN command first before I can do the checkout command?

Thanks

回复删除的用户

Re: Explain CVS to me

删除的用户 -

I've been trying both the CVS LOGIN and CVS CHECKOUT commands from Putty, on all three of the servers:

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

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

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

But I keep getting the following error on all three servers using both the LOGIN and the CHECKOUT commands:

cvs [checkout aborted]: connect to uk.cvs.moodle.org(212.219.207.22):2401 failed: Connection timed out

Any ideas or suggestions as to what is happening?

Should I be posting this problem in the Developer forum?

Thanks

回复删除的用户

Re: Explain CVS to me

删除的用户 -

Okay, problem solved...

I emailed my hosting company, and they said that the firewall on their server did not have Port 2401 open for outbound connections, but they adjusted that for me, and now it works great!!!

回复删除的用户

Re: Explain CVS to me

Jon Bolton -
Testers的头像

Glad you got it sorted Jeff. Sorry for not replying sooner, I was out of the office yesterday.

Just for the reference of anyone stumbling across this post in the future... Yes, you can do a brand new install  from CVS - just follow the instructions for checking out (downloading ) the entire Moodle code for the first time at http://docs.moodle.org/en/CVS_for_Administrators#Instructions

回复Jon Bolton

Re: Explain CVS to me

删除的用户 -

More CVS questions...

If I do a new install with CHECKOUT from CVS, it creates a new directory called 'moodle' and puts all the files in this directory.

 - Can you change the name of the directory that it will CHECKOUT the files to, to something other than 'moodle'? If yes, how?

 If the answer to the above question is yes, then ignore these questions...

 - After the files are downloaded, can I change the name of this directory, before I go thru the Moodle install process?

 - If I change the name of the directory, how will this affect doing a CVS Update?

Thanks

回复删除的用户

Re: Explain CVS to me

Jon Bolton -
Testers的头像

Rather than 'moodle', you can change the name of the directory that it will checkout the files to, by typing...

cvs -z3 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -d mydirectory -r MOODLE_18_STABLE moodle

This downloads the MOODLE_18_STABLE branch into a directory called "mydirectory" (-d mydirectory). Remember to change the server to the nearest one to you, if that's not the UK server.

But you can certainly change the name of the directory after the files are downloaded, and before you go through the Moodle install process. And 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.

回复Jon Bolton

Re: Explain CVS to me

删除的用户 -

Jon Bolton wrote "Rather than 'moodle', you can change the name of the directory that it will checkout the files to, by typing... cvs -z3 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -d mydirectory -r MOODLE_18_STABLE moodle"

Thanks Jon, that's what I was looking for. I was having trouble deciphering the help for the cvs command in Putty... I didn't find it very helpful!!!

I assume I would then do the same thing with the update command?

cvs -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle update -d mydirectory -dP -r MOODLE_18_STABLE

回复删除的用户

Re: Explain CVS to me

Jon Bolton -
Testers的头像

No, I don't think an update will work with that syntax, but I'm not able to check it until tomorrow.

You can of course simply navigate to the directory and type cvs update -dP 微笑

回复Jon Bolton

Re: Explain CVS to me

删除的用户 -

Okay, the first time I tried it, I did NOT navigate to the moodle directory, so it didn't work, so I thought I needed to add all that other stuff, but once I got to the moodle directory, it worked fine!!!

But (I know, I'm always asking another question), how does the UPDATE know which version you want? I'm playing with MOODLE_19_BETA right now.

And (still another question) how often is it "updated" on the server?

回复删除的用户

Re: Explain CVS to me

Martin Dougiamas -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像
The version is "sticky" so whatever version you last specified gets used.

MOODLE_19_BETA is just a normal tag of one moment in time on the main development version ... I've not been updating it. I just did now though, so if you update now you should see big changes.

Generally you should use branches instead, like MOODLE_18_STABLE, or HEAD. Right now there is no MOODLE_19_STABLE branch but there will be in the next day or so.
回复Martin Dougiamas

Re: Explain CVS to me

删除的用户 -

Martin wrote "Right now there is no MOODLE_19_STABLE branch but there will be in the next day or so."

Great I'll play with the beta update (for practice), and then I'll wipe it all out, and start with a fresh stable version when it comes out!

Thanks