Tracking Moodle CVS with git

Tracking Moodle CVS with git

by Aaron Spike -
Number of replies: 9
I'd like to make an attempt at using git to maintain my local Moodle development. I've seen many mentions on this forum that people are doing this but I have yet to find a tutorial or a howto on the subject. In the hope that knowledgeable individuals will step up with corrections and fill in missing information, I've started a page on the documentation wiki:

http://docs.moodle.org/en/Tracking_Moodle_CVS_with_git

Hopefully we'll end up with enough information for me to figure out how to get started. wink

Average of ratings: -
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Justin Filip -
Great idea!

I was thinking of doing something similar myself so thanks for getting this started.

I've made some updates to your doc and am interested to see what else will be added later on.
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Penny Leach -
NZVLE are doing this too - you'll find lots of helpful information in the forums from Martín Langhoff on the subject.

This thread in particular is very useful: http://moodle.org/mod/forum/discuss.php?d=34472

Our git repository is publicly available, gitweb at: http://git.catalyst.net.nz/gitweb?p=moodle.git;a=heads

There are quite a few heads there, MOODLE_15_STABLE is 1.5.3+, HEAD is origin.

mdl-local is our local branch for NZVLE development against 1.5.3+, most of the stuff on that branch ends up in HEAD.


In reply to Penny Leach

Re: Tracking Moodle CVS with git

by Justin Filip -
In fact credit for my interest, and subsequent research, on this subject can be attributed to that discussion thread.

I haven't actually switched over to using Git full time yet but I find the CVS server emulation that Martin is working on to be quite interesting, especially so because it is being tested for it's interaction with Eclipse and it's CVS Team plug-in.  At the moment Git is a bit overkill for what OKTech is doing.  Then again, I do have a Git repository that has been created from the Moodle CVS on SourceForge on a server so I'm at least ready for if/when it becomes a need rather than an amusing distraction.
In reply to Penny Leach

Re: Tracking Moodle CVS with git

by Aaron Spike -
The work at NZVLE is my inspiration for pursuing this path also. Penny, I hope you and Martin will be able to find the time to help us consolidate the helpful information that is scattered around the forum into a single location. smile

The most urgent item for me is solidfying the information under the "Importing CVS" heading. I expect I can experiment with git once I have it set up and learn quite a bit, but the initial import is a huge investment in time, so I'd like to get it right. Can anyone suggest an appropriate set of flags to git-cvsimport? Can you tell me when a user might want to use some of the other flags (-m -u -s)? I have started the import a few times and had to kill it for various reasons. Should it be able to pick up where it left off? (I was having difficulty.)

Additional topics I'd like to see covered include:
  • Proceedure to follow when Moodles stable branch switches (ie from 1.5.3 to 1.6)
  • Pros/cons for doing development against Stable or HEAD CVS branches
  • Process for making deployments out of a git repo
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Justin Filip -
I updated the "Importing CVS" section to include the (very simple) script I run to do my own CVS updates.  It's run within a directory /var/lib/git and you can either run it nohup or use a program like screen to detach the process from the console.  Personally, I like using screen.  That script will do the initial (very, very long) import and also the additional updates.

The actual directory where the git repository is stored is 866MB in size.
In reply to Justin Filip

Re: Tracking Moodle CVS with git

by Aaron Spike -
Thanks for filling in information.

I ran your script yesterday. du reports 1.8G on my directory. I wonder what causes the discrepancy.

I was hanging out in #git yesterday trying to get explaination for the "why" behind the options to cvsimport and was pointed to another cvsimport wrapper script that has the option of starting from a tarball.

http://www.progsoc.org/~wildfire/git/update-repo.sh
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Justin Filip -
Not having to pull everything from a pserver (such as SourceForge) that isn't on the local host would be a nice to have.  When I first tried to import the Moodle CVS repository from SourceForge it took me days before it was successful.  And this was only because each run took so long that I would start it at night and check if it worked the next morning.  It didn't work or quite a while.  smile

I'd like to play with Git more than I have but, unfortunately, real work gets in the way of my messing around with something I've decided is unnecessary at this point in time.
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Aaron Spike -
In the log file generated by git-cvsimport I see a lot of messages like the following.

WARNING: Invalid PatchSet 10715, Tag MOODLE_14_MERGED:
    lang/et/help/quiz/correctanswers.html:1.1.6.1=after, lang/zh_tw/quiz.php:1.1.8.1=before. Treated as 'before'

If you wonder what that means look here:

http://www.gelato.unsw.edu.au/archives/git/0505/4221.html
In reply to Aaron Spike

Re: Tracking Moodle CVS with git

by Martín Langhoff -
For some reason I had totally missed this thread. I think I may have been on holiday back when it started wink

Anyway - thansk to Aaron for documenting this stuff! I've just updated the wiki pages with some tips and tricks, specially on how to get stuff from GIT into CVS, so there are no obstacles to the giving back part...

http://docs.moodle.org/en/Tracking_Moodle_CVS_with_git