Simple CVS question

Simple CVS question

by John Isner -
Number of replies: 5
What CVS command can I use to check out a single third-party module from contrib? The only example I can find checks out all of contrib.

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

Also, what CVS command I can use to see the list of third-party modules in contrib?

 
Average of ratings: -
In reply to John Isner

Re: Simple CVS question

by Samuli Karevaara -
To just browse the contrib it's probably easiest to go to the web interface at http://moodle.cvs.sourceforge.net/moodle/contrib/.

Then there is also the Modules and plugins page.

Anonymous CVS checkouts might now work for the moment (?), but in principle you can add the folders to the module name, for example instead of just "contrib" say "contrib/plugins/blocks/email" and you only get this folder.

In reply to Samuli Karevaara

Re: Simple CVS question

by John Isner -
Hi Samuli,
Thank you for your answer. I was just about to delete my post after figuring it how to do it from the command line:

cvs -z3 -d:SERVER:/cvsroot/moodle co contrib/plugins/mod/book

I didn't know about the CVS Web interface, but that will help in the future.
In reply to Samuli Karevaara

Re: Simple CVS question

by John Isner -
This is the first time I have used CVS for third-party modules and blocks, and I need to know the best way to merge the files extracted from CVS into the Moodle root directory. I want the third-party files to remain under CVS so that I can upgrade them using CVS.

For example, the book module in CVS has the path contrib/plugins/mod/book (relative to the directory in which the checkout is done), while the the equivalent path relative to to the Moodle root directory ($CFG->rootdir) is simply mod/book.

Should I do the checkout in some temp directory and then use the mv command to move the various directories into $CFG->dirroot, or is there a clever way of extracting directly in $CFG->dirroot?
In reply to John Isner

Re: Simple CVS question

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you originally checked out the code using

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

I think you can then check out a module from contrib using:

cd moodle

cvs co -r MOODLE_18_STABLE -d mod/CUSTOMMOD contrib/mod/CUSTOMMOD

Where you should change CUSTOMMOD to the name of the module you want (or change of the path if you wanted to check out a quesion type, say).

I have not actually tested this, I just know how it is supposed to work. If you try it and can confirm it works, please add this to http://docs.moodle.org/en/CVS_for_Administrators.

After you have checked out something like this, a single CVS update in the top level folder should update Moodle and all plugins.
In reply to Tim Hunt

Re: Simple CVS question

by John Isner -
Thanks Tim. I will definitely try your suggestion and report back.