The continuing story of moving Moodle towards Git

The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Number of replies: 54
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
We've got the docs, we've got a repository ... and we are more and more people who would like to use Git (and abandon CVS). After talking about it with a few people over here at HQ, here's what ... :
  • a lot of Windows users are currently using tools like TortoiseCVS, the kind of which there is still no equivalent for Git (I still have to try git-cheetah, don't know if it works on Windows)
  • the Windows port of Git still requires either Cygwin or Ming (in development)
  • ...so having a git <-> cvs gateway is necessary for an easy transition, until everybody (in a few years?) abandons cvs; this gateway could be updated with a delay (every X minutes), if it makes it easier
  • download mirrors (read-only, updated by rsync) are providing the CVS tree at this time and a lot of people depend on this to update their sites, we absolutely can't lose this
  • ...in time, everybody will love Git! smile
So, what am I forgetting? How do we get there? Comments from people working at Catalyst and other people who use Git to track Moodle would be nice, especially about problems we might end up having.

Now, does anybody know a good way to get this CVS <--> Git gateway working?

Mathieu
Average of ratings: -
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Francis Barber -
Mercurial is another SCM that is similar to Git. It works well under Windows (I think it is written in Python). This would need some more investigation, but Windows users could possibly get mercurial to read the git repository.

I think projects such as Mozilla are using Mercurial because it works well under Windows and Linux.
In reply to Francis Barber

Re: The continuing story of moving Moodle towards Git

by Ray Lawrence -
Not having a direct alternative for Tortoise would be a complete pain.

IMO the developers need to think more widely about the current user base and it's ability to cope with another method of updating and the (unnecessary?) disruption that would cause.

As a non-developer here are my questions:

MD and MHQ: Is CVS just so bad it really needs to be abandoned?
ML et al: Is GIT really perfect? No downsides? Please think beyond your own set up on this.
Average of ratings: Useful (1)
In reply to Ray Lawrence

Re: The continuing story of moving Moodle towards Git

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes, CVS has some horrible flaws as a source code management system.

A lot of the major flaws that affect small development teams with few branches were fixed in subversion, but for large projects like Moodle, the distributed source code management systems like GIT have an advantage.

Git is not perfect. It is a very fast and robust core of functionality for managing large source trees. However, as Mathieu said, the area where it is weak is in tool support - nice interfaces to make that power usable by most people.
In reply to Ray Lawrence

Re: The continuing story of moving Moodle towards Git

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
don't forget - if we moved to a new version control system, read-only mirrors of CVS would be around for a while - they wouldn't be abandoned! smile - the move to git would be to improve the management of the development process for core developers. Potentially those without write CVS access wouldn't notice any major difference... they could still use tortoise etc....

smile

Dan
In reply to Francis Barber

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
Moz picked Mercurial (Hg) because Windows support was rather weak when they made the call. That is no longer the case - git outpaces hg by a large margin on stability and features on Windows these days.
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Francis Barber -
Yes, agree with respect to speed. The point really was that you don't need Cygwin or Ming. (I don't actually care as I use Cygwin anyway, but I thought someone might...)
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Penny Leach -
Yes, that is right. People with shell access to those servers (Catalyst employees) sometimes run the sync manually when that happens.

The sync runs at 5:30am NZ time.
In reply to Penny Leach

Re: The continuing story of moving Moodle towards Git

by François Marier -
The Catalyst CVS => git sync now runs at 50 minutes past the hour, every hour.

It should therefore be as up to date as any other mirror.
In reply to François Marier

Re: The continuing story of moving Moodle towards Git

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's great! big grin By the way, I don't know what kind of load you are having on that machine, but we could provide a 'mirror' for the moodle git repository, should you need it.

Saludos. Iñaki.
In reply to François Marier

Re: The continuing story of moving Moodle towards Git

by Ashley Holman -
Hi Francois,

How can I track MOODLE_19_WEEKLY through your repo? I can't see a tag/branch for it.

Cheers
Ashley
In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
The branch to track is 'origin/MOODLE_19_STABLE'.

You can have a look at http://git.or.cz/course/svn.html#remote to get a bit more information on how to track this one...

EDIT (2 minutes later): sorry, I thought you meant stable.. that'll teach me to answer messages too quickly. Weekly doesn't seem to be in there, but as it's a tag (and not a branch), I don't know how git deals with it.

Mathieu
In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
Unfortunately, the _WEEKLY trick is a "moving tag" which is, in strict terms, a bad hack. You are not supposed to use tags in CVS that way sad but cvs is so broken that it is the most reasonable way to do it.

Which means that they way it gets recorded internally in CVS is not good enough for the git importer to import anything about it. So the force-moved tags (_MERGED, _WEEKLY) do turn up in the git repo, but they are usually in the wrong place.

Sadly, there is no good way to handle this.
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Ashley Holman -
Hi,

Is there an issue with git://git.catalyst.net.nz/moodle-r2.git at the moment?

$ git pull
remote: Counting objects: 20, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 10 (delta 1), reused 0 (delta 0)
remote: aborting due to possible repository corruption on the remote side.
Unpacking objects: 100% (10/10), done.
error: waitpid (async) failed
fatal: error in sideband demultiplexer

I also get the same error if I try to do a fresh clone of it.

PS. any plans on having an 'official' Moodle git repo?
In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by François Marier -
It works fine for me. Are you still having problems with it?

Does cloning the repo again work?

Francois
In reply to François Marier

Re: The continuing story of moving Moodle towards Git

by Ashley Holman -
It started working again about an hour after I reported that. At the time, I tried doing a new clone and had the same problem. Nevermind it's fine now. Thanks for providing this cvs/git gateway smile

Has there been any talk of getting your cvs-to-git repository hosted under a moodle.org hostname and getting others to mirror it? This could be a step towards eventually having git as the authoritative SCM and then CVS can mirror git, as talked about in this thread. I should be able to organise with our sys admins here to host a git mirror on AARNet.

BTW I am loving git, it's making it really easy to work with customised versions of Moodle and keep tracking the upstream changes. The branching makes it so simple to do staged upgrades etc, and being distributed works well for hosted environments with multiple servers.. seems to be a good fit for Moodle.
In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
There have been talks, but I think that there are still issues to resolve before we can make an official move to git. Main issues: no integration with IDE like Eclipse and Netbeans and we'll need to update the code that takes care of moodle.org/cvs (account management and all). I suspect this last one is hugely different in Git...

Mat


In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -

we'll need to update the code that takes care of moodle.org/cvs (account management and all). I suspect this last one is hugely different in Git

You can count on me for that one.

The "perfect IDE integration" side, I think is going to take some time. Which is a real shame, because if we really wait on that, a handful of developers end up blocking a much better workflow for the overall moodle project.

For example, in a pure CVS world, the accesslib rework I took on last year would have been impossible. By using a dscm, we can take on deeper rework/refactor close-to-head-but-not-in-head until it is ready. And if it does not pan out, we can discard it any time. I discarded several attempts in my accesslib rewrite early on -- the overall approach I took was copied from how kernel devs take on internal API refactors in the kernel. At the end of it you always have to shake out bugs and inconsistencies, but you can get quite far on a risky dev branch and merge it only if it pans out.

In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
but surely Martin, the fact you could use GIT for the accesslib rewrite shows that using CVS for the core repository is not a complete blocker. The very small number of people who do major refactoring can use GIT, albeit with difficulty, but then you hope anyone doing a major refactor is a highly skilled developer, and they will be doing enough work that it is worth learning GIT. On the other hand, the hundred of people with CVS write access to all or part of the repository don't need to be retrained. So there is no pressing need to change from the status quo.
In reply to Tim Hunt

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Mmm, I don't know about that. I think there is a need for git - but I still think it can't be used without appropriate tools.

For info, on my Mac at home I have now tried Git, and the Eclipse plugin egit.

About the plugin, it basically work and the history view looks good. But, bad news: it's not one of those projects where a '0.3' is actually useful. smile
  • Critical usability issues:
    • You appear to have to type in your name/email for every single commit, making it far too painful to use (maybe this was a glitch of the particular build I tried, I think I used head rather than the latest release, can't remember).
    • Initially creating a repository is easy, but weird. It wants to create a .git folder in the parent directory of the project, not in the project's directory. What? I let it do this but I don't think it makes sense. I'm sort of unclear as to whether the 'repository' Eclipse concept even makes sense for Git (at least in the way they used it), maybe that is where the problem lies.
  • Doesn't appear to handle Eclipse cvs behaviour of Commit automatically doing Add for you. (I didn't test Delete, which should do the same.)
    • Related, no 'add to .gitignore' or whatever.
  • I wasn't sure whether the 'file has changed' markers were intelligently using the Git hashes or were just based on filedate. (OK this is not major but since Git has the nice hashes it would be great to take advantage of them, I hate it when files look like they changed but actually didn't.)
  • No 'Compare with' (no way to get Eclipse compare view at all) and no merge support.
  • No support for many Git features (inc subprojects if anyone cares about that).
These are not criticisms as the project is not at 1.0 - just a heads-up that no, it isn't yet usable. However the good news is that contrary to my previous comments, there were recent commits from multiple people in the project so it definitely doesn't seem to have been abandoned.

Git commandline: very easy to install on Mac thanks to somebody packaging it (yay). Much better than cvs on the commandline except that launching vi editor by default for comments is deeply evil. (You can change this by setting EDITOR variable, which I did, but I don't really like it launching a TextWrangler window for comments even though it works fine... I guess I could use pico...)

--sam

In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Myles Carrick -
Yes... egit isn't quite there, yet. The fact that branching and merging is such a delight in Git is one of its key strengths, and you certainly need tools that leverage this ability (or else you start using Git like other, non-distributed SCMs). I notice though that the Aptana editor is now supporting the project, so it's likely to really get some attention now.

If you haven't visited it for a while, Rails/Merb developer Scott Chacon has done a complete redesign of the site for the git project, and has included tons of links to resources - cheat sheets, screencasts etc. It's interesting that the Rails community, where the vast majority of developers work on Macs, has embraced Git with few issues.

FWIW (and although I don't mind Vim at all), I rarely enter the editor for entering messages - I just enter them inline when committing
git commit -a -m "my commit message"
Myles C.
In reply to Tim Hunt

Re: The continuing story of moving Moodle towards Git

by Dan Poltawski -
the fact you could use GIT for the accesslib rewrite shows that using CVS for the core repository is not a complete blocker.


This is an excellent point and it also brings to my mind why such a move would be a mistake right this moment - we'd continue to use git like cvs. git does a better job than CVS as this task, but that is not why people are shouting about change. The DSCM workflow should be quite different to the current flat CVS model. [This is also why I don't think these various IDE integration projects have not got very far - the model is fundamentally different, a UI paradigm has yet to be defined).

But I still think there should be a change from the status quo. If more developers and reviewers began to use and become familiar with DSCM tools we could become more effective as a review and development team, but without large-scale adoption at the reviewing stage we loose a lot of the benefits.

Catalyst have obviously been a shinning example of how CVS and git can interact. My observations have been that the benefits for the project have been less pronounced because:

* Reviewers have not understood the model/tools - [1]
* Most development takes place away from this model and doesn't interact with it

But its a worthy effort to make, because I do not think re-factoring reviews with a massive multiline line patches work well enough right now.

[1] Put your hand up if you've been given a link to gitweb url and asked how to get a single patch file from it!
In reply to Dan Poltawski

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
Dan, I think you have a really good point there. I am not familiar enough with Git to come up with good explanations of how to adapt Moodle's development model to take full advantage of Git's possibilities. Needless to say, I can't convince MD either.

Maybe somebody that knows Git well could start a page in the wiki, explaining how Git should be used, by developers, translators and administrators. I'm sure this would go a long way for all of us who have minimal experience with it.

Mat
In reply to Dan Poltawski

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
What Tim says makes sense to a degree. As Dan hints, using git can bring about a change in dev practices, one that will be hugely beneficial to Moodle.

For example - the review process that is happening is a move in the right direction, but CVS makes it awkward and fault prone - git supports doing it correctly.

OTOH, I think it is natural that on the initial change to git it would be used mostly like we use CVS, and then as people get acquainted with it, better practices start to catch on. We cannot get the better practices without the switch wink

Back to what Tim was saying, yes, we can stay on CVS and have some developers use git. But extending the practices that git allows to all the core devs does have a benefit.

My opinion hasn't changed in that it's not an urgent thing. I just hope - as I mentioned earlier - that Eclipse support doesn't hold us back completely because there are project-wide benefits to it that seem to me bigger than the (understandable) inconvenience.
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Dan Poltawski -
(Disclaimer: git fan here too)

I seem to recall that there is a good bidirectional svn gateway to git.

While two VCS system changes might be a bit much, I think you could plod along quite nicely git+svn for quite some time.

* The move from tortoise cvs -> torise svn wouldn't be a big step. (Especially important for non-developers e.g. the poor translators!)

* All you crazy ( wink ) eclipse users would be satisfied as I am pretty sure there is an eclipse plugin for svn (and practically everything else which cvs plugins exist currently)

* Those people pushing for a move to svn would also be satisfied!

At the moment the git windows client is good if you are a cli geek, but I don't think its point and clicky enough. (And I don't blame them -I have no idea how you'd design that interface ;) )

But my major vote is for a distributed system rather than necessarily git (and I think the same can be said by most git fans round here), the barriers we hit with development are with the centralised system and merge pain, mammoth patches etc.

(But git brings constantly brings me joy and moodle moving to it would be a dream come true :P)

Edit: Just an anecdote - if you can handle the cvs tag/merge between between branches, then you can handle anything git throws at you angry
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi,

At the OU we experimented with a git to CVS gateway to resolve these problems - almost all our developers used Eclipse, or Tortoise if they're really hardcore, while the git plugin for eclipse is only half-done (at that time, it was not-at-all-done), and at the time Cheetah did not run in Windows either.

I think we may even have funded some development of it? However we couldn't really get it to work properly (it did work but there were lots of issues) and in the end we abandoned it in favour of manual merges.

I suspect doing it read-only is an awful lot easier but that means making all developers lose all tool integration sad

Don't get me wrong, I know I come across as the git who always bashes git smile But from what I've seen I think it's pretty great and I would actually honestly love to move to it. In fact I'd start using it right now on my personal projects at home. But not while the tool integration isn't finished.

Also it's a bit disturbing that there doesn't seem to be enough of a git community, or that the git community is so hardcore linux-only 'who needs an IDE when you have vi AND front-panel switches', so that progress on the efforts to integrate tools [Cheetah, Eclipse plugin] appears slow. Similarly the UI on the web version appears to be a bit crap.

--sam
In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Dan Poltawski -

Also it's a bit disturbing that there doesn't seem to be enough of a git community, or that the git community is so hardcore linux-only 'who needs an IDE when you have vi AND front-panel switches', so that progress on the efforts to integrate tools [Cheetah, Eclipse plugin] appears slow. Similarly the UI on the web version appears to be a bit crap.


I definitely do not think the git community is small! Just look at the number of people in the irc channel, activity on the mailing list and number of projects switching to it.

My impression is actually that the pace of development is amazingly fast!

I do agree that I expect there was a shell-based bias with development and that might be why the plugins and gui tools aren't as developed. But I think thats quite natural given the origins and the only way is up.

The complexity of putting some of the real power of git into a gui (rearranging commits, granual hunk commits, rearranging branches ) is also non-trivial.

(And the web ui grows on you - I think the major thing people don't like is the fact it doesn't show the tree by default).
In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
Yes, OU funded the main part of my work (and Martyn Smith's) work on git-cvsserver (*thanks!*), which Linus Torvalds has both recommended, and called "insane".

... about par for the course, I guess...

The git community is growing fast - and notably, it seems to be outpacing all the other DSCMs in userbase, enhancements and dev community. There are quite a few people working on the GUI aspects, AFAICS -- part of the problem is that we need different visual metaphors too. Mimicking TortoiseCVS and the CVS/SVN Eclipse UIs doesn't get us anywhere sad

(The Eclipse efforts are IMO delayed because the team doing it wants a pure Java implementation of the whole stack. So they are doing both the UI stuff and tracking that fast-moving target that is GIT.)

Edit: Some graphs of reports from Debian follow

- Installation reports - Git growth amongst DSCMs http://tinyurl.com/4uemg2
- Usage reports - With a longer timeframe, and counting CVS/SVN http://tinyurl.com/4hu2cn

In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Myles Carrick -
Git is actually getting momentum in a range of areas... spurred on in no small way by a particular MVC web framework project's decision to move from SVN to Git.

Some interesting stuff out of that includes:

http://github.com/ - get a free personal public git repo with some cool tools and
http://gitcasts.com/ - free screencasts by Scott Chacon on using Git... admittedly with a particular bias. The most recent (at time of writing) one is: "Git on Windows" wink

Myles C.

NB. That particular framework project now manages its collaborative development, bug tracking, etc. with http://lighthouseapp.com/ (a tool that includes GitHub integration).

In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -

A few quick comments...

A transition to GIT would mainly impact core developers. We can leave lang in CVS indefinitely. For core developers, GIT commandline is working fantastically well on linux, OSX and Windows (with the MinGW port). The MinGW port is just an MSI installer, all included - in other words, it does not require users to pre-install anything funny.

In terms of GUI usage, gitk is excellent (usually combined with CLI usage), and git-gui is almost ready for 100% GUI usage (some advanced actions still require CLI usage IIRC).

Eclipse-IDE integration (aka EGIT) and the TortoiseCVS lookalike (Cheetah) are evolving quickly, but they are not there yet, unfortunately.

One point that is not straightforward is the transition for people tracking anon CVS for their installations. Yes, we can (and probably should) use git-cvsserver, but the CVS repo that git-cvsserver exposes not look 100% identical to what CVS itself does. The module and branchnames aren't the same, and the rev numbers don't line up (they probably do on HEAD, but they don't on branches). This will probably be the most serious blocker.

Another detail: Catalyst's repo is using an import done with parsecvs (by Keith Packard) which is the best importer so far but cannot do incremental imports. The incremental imports are done by git-cvsimport, but the process is not 100% watertight - a few commits do get dropped every once in a while (blame the cvs protocol for that sad ). So Catalyst's repo (and any repo tracking CVS) has a little bit of drift (that gets fixed up). We will want a fresh start.

Here's a brief plan of how we could tackle the migration, step by step:

  • Warn the world
  • Freeze CVS 'moodle' module (chmod -R ugo-r)
  • Run a fresh import using parsecvs
  • Check it for sanity wink
  • Publish it
  • Enable git-cvsserver
  • Open the gates

That would work great with us keeping a centralised repo model -- what we have in CVS -- with one caveat: git does not have "native" per-directory restrictions. We can mimic that with a hook, but it's weaker in GIT than in CVS (there is an option to override the hook).

Apologies for the brief-ness/hurriedness, things are crazy at 1CC...

In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Samuli Karevaara -
"and the TortoiseCVS lookalike (Cheetah) are evolving quickly"

I hope that is the case, but according to the comments here: http://code.google.com/p/msysgit/wiki/GitCheetah the original developer has dropped Cheetah?
In reply to Samuli Karevaara

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
Ah, Johannes. Well. We still have git-cola (new, flashy), qgit (been running flawlessly on Windows for a while). They are more like "WinCVS" than like Tortoise. And a few ppl in the mailing list are talking about hacking on git-cheetah.
In reply to Samuli Karevaara

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Yes, I wanted to comment on that portion of Martin's post as well. From the egit (Java/Eclipse git implementation) wiki page:

'Q: Is the project active? A: Depends on what is meant by active. Admitted the progress is slow, mostly because there are very few people involved so far, but the project is certainly not dead (as of February 2008). '

Obviously I don't blame the people involved with either of those GUI projects as they aren't getting paid for it. But compared to other projects, it does look worryingly like git is a source management system not only designed for Linux (which it was) - but that this legacy might continue, where few of the people involved with it actually care about any possible usage on any other platform [be that cross-platform Java, or Windows GUI].

It seems that the system back-end works fine, so the most important area for development is surely tool support. Out of two key tool areas one has apparently been abandoned by its main developer, and the other is worked on only sporadically.

HOWEVER maybe the situation isn't that bad - I just looked at the egit repository and it does seem to show checkins by 4 different people over the past week. So things could be looking up. I just think it's inappropriate to force developers (some of whom may still have difficulty understanding CVS, even when it's presented through a nice, integrated interface) to use a new system before the tools are ready.

--sam
In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
EGIT/JGIT is definitely alive, and apparently people have an Alpha but usable UI for it.

For WinCVS lookalikes there are a few candidates (qgit. git-cola). It is a shame that git-cheetah is not active - there is some noise about resurrecting it mixed
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Martín Langhoff -
Couple of additional notes --

From my POV as part/instigator of the group of developers using GIT, I think there is no hurry to move the main dev tree to GIT. We could make it a temporary practice that new _feature_ code should be drafted as a nice patch-series in GIT, reviewed there, and then landed in CVS, like I did with my accesslib rework. IMHO, this model leads to higher-quality code - the reviewer can push-back a bit, and force the author of the feature to do cleanups _before_ it gets into CVS HEAD. And if the branch turns out to be a dead end... well, it's as if it had never happened wink

As a developer, I find that liberating.

And from a 'moodle maintainer' POV, our current CVS HEAD has some dead ends lying there, "disabled". That is dead code that even makes it to releases. So... thankfully moodle is well modularised - users don't get to see it at all. But it would be better to ship clean code - one of these bits of dead code could have security issues mixed

With the approach above, the core team gets 99% of the migration benefits, with 1% of the risk. Dealing with git-cvsexportcommit and the occassional minor drift is a pain, but I think it might be worthwhile.

Another point is that once we do move wholesale to git, we can look into small variations of the "purely centralised, HEAD and _STABLE" approach we have now. For starters, things like the _REVIEWED branch stuff are much easier and cleaner to maintain. And over time, we might find that it makes sense to run more feature branches, and our HEAD branch be an "integration" place.

Back to my real work - I'm... a few months late with the release mixed
Average of ratings: Useful (1)
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Hg

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I vote Mercurial wink
In reply to Petr Skoda

Re: The continuing story of moving Moodle towards Hg

by Valery Fremaux -
I tried git-gui on WinXP, and sincerely, the GUI is much less comprehensible than my old WinCVS. Although principles of GIT seems being much smoother and make daily job simpler, this does not appear in the git gui organisation... till now... IMHO... 
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

with one caveat: git does not have "native" per-directory restrictions. We can mimic that with a hook, but it's weaker in GIT than in CVS (there is an option to override the hook).

Hummmm, having a look at githoooks(5) manual page it says you can bypass the 'pre-commit' hook, but I don't see any reference to being able to bypass the 'pre-receive' and 'update' hooks on the remote repository.

If you can't bypass them, then we could actually enforce per-directory (or per-file or per-whatever) rectriction on the 'canonical' repository, couldn't we?

Edit: I've just seen a message by Junio C Hamano in Documentation/howto/update-hook-example.txt (in the git source tree) that is titled 'control access to branches' that deals with a similar problem (but in the context of branches, instead of directories/files; it shouln't be too dificult to adapt it to the pre-receive hook for our situation).

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: The continuing story of moving Moodle towards Git

by Nigel McNie -
A note from your friendly local Mahara developer - we have done exactly that with git.mahara.org, and it works a treat smile
In reply to Martín Langhoff

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
Thanks for all this information Martín.

Can you tell us if the mis-match between cvs and git version numbers would be a problem with Jira using a cvs gateway to keep track of the changes happening in all the branches?

At this point, after reading this thread, I think we are still many months away from being able to move without creating chaos in the community. sad

Let's make a plan anyway.. smile

Mathieu
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Dan Poltawski -
Just thought of another missing element..

* jira integration
In reply to Dan Poltawski

Re: The continuing story of moving Moodle towards Git

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Except that Jira could work from the read-only CVS mirrors we are going to maintain.
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Ashley Holman -
Does anyone know if there is a CVS mirror with rsync available? I read the doc on using git-cvsimport at http://docs.moodle.org/en/Tracking_Moodle_CVS_with_git, but it refers to rsyncing from sourceforge which is no longer up to date. I'd rather not have to run git-cvsimport over the cvs repo remotely as it would probably take a very long time. Has anyone tried a git-cvsimport without using rsync and if so how long did it take?

Thanks
Ash
In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

At least es.cvs.moodle.org does wink Beware that compression is disabled to keep the CPU load down (we have lots of bandwith, but the hardware is not that powerful and there are other services running on that machine).

This can impact the firt rsync download a bit, but should not be that noticeable for subsequent rsync operations (if you do them at regular intervals, e.g., daily).

But I'd really recommend cloning the git repo at Catalyst. The CVS import is really heavy, takes a lot of time, and sometimes produces different results from the official CVS repo. The people at Catalyst are doing a good job at managing all those things for a lot of us (specially detecting the repo shift and fixing it). Kudos to them!

On the other hand, if you clone your repo from the repo at Catalyst, you'll have the same history (sharing object 'names' -the SHA1 name-), which eases things quite a bit if you intend to share your modifications with other git users (push and pull operations between repos become possible, and they are much more efficient and less time cosuming and error prone that patches/patch series).

Saludos. Iñaki.

In reply to Ashley Holman

Re: The continuing story of moving Moodle towards Git

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
We've been out of Sourceforge for a few months now ... but we never completely updated the documentation to remove all traces of it. I did so after reading your message, finally.

I tested only two servers and the 'eu' mirror doesn't allow rsync, but the 'es' server seems to be ok with it. In any case, the Catalyst Git repository works well, you may want to use it instead of creating one from scratch (and they keep it up to date too...).

Mathieu
In reply to Mathieu Petit-Clair

Re: The continuing story of moving Moodle towards Git

by Nate Baxley -
I am new to Moodle and was hoping to pick up CVS while learning Moodle to get a handle on both of those. I've not used a versioning system in the past (my projects have mostly been 1 or 2 people projects). So, if Moodle is going to be changing versioning tools, can someone tell me what the perceived benefit of moving from CVS to Git is?
In reply to Nate Baxley

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I would recommend you continue with your plan.

Learning CVS is a useful skill anyway as it is the benchmark everything else is compared against, and - even if developers change to git - CVS is likely to keep working for end users one way or another.

The most fundamental difference is that Git is a distributed system, i.e. not just the current version, but all previous versions are stored on every machine. In CVS only the server stores all previous versions, your machine just has one version. But there are lots of other differences to do with Git being 20 years newer.

In summary, please go ahead and learn CVS and don't worry about this argument discussion. smile

--sam

PS Copied from some random site (why yes, it was the first result for my Google search, how did you guess):

Key advantages of Git in general

  • Excellent native support of distributed development paradigm
  • Collaboration can occur over many media: SSH, HTTP, WebDAV, FTP, or emails (no need to open special port)
  • Branching/merging is a native central concept
  • Merging is powerful: simple and automatic merging with complete history (and the repo history itself keeps all merging history)
  • Robustness: internal file formats are very simple; corruption is very rare and recovery very simple
  • It is very fast

In reply to Nate Baxley

Re: The continuing story of moving Moodle towards Git

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to add to what Sam says, if you want a good book to introduce you to CVS and version control, Pragmatic Version Control with CVS is a good one. (And no, that Andy Hunt who is an author is not a relation of mine.)

(((Hey! there is now a Pragmatic Version Control with GIT - or at least there will be come September 15th.)))
In reply to Tim Hunt

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
'Pragmatic Version Control with GIT'

Does page 1 say 'wait 2 years until the community finish developing basic tools'?

*ducks*

SORRY

--sam


In reply to sam marshall

Re: The continuing story of moving Moodle towards Git

by Dan Poltawski -
Wow, thats quick by cvs standards? clown [1]

[1] First CVS release in 1985, Tortoise CVS released for windows a speedy 15 years later .
In reply to Dan Poltawski

Re: The continuing story of moving Moodle towards Git

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Well, I'm being optimistic!

By the way, personally, I wasn't using CVS in 1987. smile I think you'd have trouble finding a Windows - 2.0 of course - user who was doing so... mind you as Windows 2.0 didn't run anything except Excel, maybe that isn't surprising...

--sam