Thiago Macieira
KDE
Posted by Thiago Macieira
 in KDE
 on Friday, December 28, 2007 @ 18:50

As you may have noticed, the year is almost over. I like the name Trenton is using for it: Space Christmas. This is usually a time when people aren’t working on their day-time jobs, so they are left with some free time to do other stuff. For example, go to the beach or the swimming pool, enjoy the sunshine, etc.

What? You don’t do that? Yeah, I guess it’s my Southern-hemisphere-centric view talking. It’s 32°C in São Paulo right now, so I can only imagine how warm it is at the beach (75 km away and 800 m down).

Anyways, like I was saying, this is a time of the year people start working on other stuff. That is true as well for me. I have decided to actually start working on the Subversion-to-Git conversion tools I’ve been talking about for months. So you can expect a few blog entries from me in the upcoming weeks how the progress is going.

But I’d like to explain first of all why I chose Git. And the short version is: because I’m lazy. Yes, the reasons are entirely personal and not technical, so please don’t post a comment accusing me of that. I already know.

The funny thing is… I didn’t choose Git. I chose Mercurial at first. For two reasons, all of them showing my laziness and stubbornness:

  1. it was installed already on my laptop, because I had had to use it to pull the Em2880 v4l-dvb driver for my USB TV tuner.
  2. because everyone was talking about Git, I wanted to be different

So, sometime in May this year, I decided to convert my local SVK tree of the Qt snapshots. SVK is a good program, written entirely in Perl on top of the Subversion libraries. I suspect that Perl compiling all of that code on-the-fly is a bottleneck, because after a while SVK was too slow for me. Therefore, I chose Mercurial to convert to.

Besides, I figured that, since everyone was talking about Git and using it, I might as well provide another point of view.

Unfortunately, my laziness reared its ugly head again: I failed to make heads or tails of the conversion tool that Mercurial uses. And people say it’s an easy tool, so I must be really lazy.

At the urging of a fellow Troll working on WebKit (though technically I wasn’t a Troll at that date) and a fellow KDE developer trying to convert the entire KDE repository, I decided to give it a try. And after a few fixes on Chris Lee’s svn-fast-export, I managed to convert my SVK local repository to Git! [Note: I now know that tool to be extremely limited and will produce erroneous conversions in some cases]

Since then, I have found more reasons to stick with Git, including the fact that I’m using Git inside Trolltech to avoid using Perforce. I won’t enumerate them here because they are technical. [Who cares about technical reasons backed by numbers? We should all make decisions based on personal feelings! The bikeshed is always blue!]

So last week I started working on a rewrite of svn-fast-export, which I called svn-all-fast-export because it creates multiple Git repositories. It’s a very powerful tool, but not very easy to use. It took me 2 days to finish writing the rule file for the import of the KDE main modules.

But I’m happy to say I’ve reached the third milestone in the conversion process. For those lazy to click the previous link: I managed to convert the KDE modules “arts”, “kdesupport”, “koffice” and “KDE/*“, with all official branches, to Git. For the details, click the link.

PS: have you noticed how I managed to link to 5 different revision control systems in this blog?

8 Responses to “Git import of KDE — or a tale of how I am lazy”

» Posted by Quintesse
 on Friday, December 28, 2007 @ 20:30

But how about the cross-platform availability of Git? It still works less well on WIndows as far as I know and support in development tools seems almost non-existent. On the other hand I was pleasantly surprised to see a couple of days ago that there’s already a pretty functional HgTortoise for Windows. I now wish I had lobbied a bit more for Mercurial instead of Subversion at work, but Mercurial was still lacking too many of the tools some months ago. For me personally the rule is: if there’s no plug-in for Eclipse, forget it :)

» Posted by Patcito
 on Friday, December 28, 2007 @ 22:35

@Quintesse: Git works perfect on windows, check out this link: http://code.google.com/p/msysgit/downloads
There’s also a plugin for eclispe which works great: http://repo.or.cz/w/egit.git
Git has also many gui just as good as Tortoise, you have git-gui, gitk and lately a Qt4 version called qgit, here is the windows version:
http://digilander.libero.it/mcostalba/qgit2.1rc1_win.exe

There are many other GUIs and projects for Git just check the wiki.

» Reply from Thiago Macieira
 on Friday, December 28, 2007 @ 23:00
Thiago Macieira

Indeed, like Patcito said, there are people using it on Windows. Granted, it’s not as fast as on Linux (I’ve also seen it slow on MacOS X), but it’s very much usable.

Besides, we’re talking about the KDE repositories here. There won’t be any switch for the next few months. There’s still a long time for tools to be written before any switch happens.

» Posted by Chris Roland
 on Saturday, December 29, 2007 @ 00:06

So what’s the difference between Bazaar (http://bazaar-vcs.org/) and Git?

» Posted by Ian Monroe
 on Saturday, December 29, 2007 @ 00:35

Well until recently Bazaar would start using huge amounts of memory when you imported from SVN. Apparently this has been fixed in their trunk.

» Posted by Quintesse
 on Saturday, December 29, 2007 @ 12:29

Grrr, I just lost a large comment because I hadn’t filled in the security code and “use your browser’s back button” gave me an empty form.

So I’m just going to make a short statement: I know Git works on Windows. But it is hardly perfect (see gotchas here: http://git.or.cz/gitwiki/WindowsInstall which doesn’t mention the age-old problems with using cygwin: paths and file/access rights). And an SCM made by developers who admit that “the core git team never touches Windows, so they both have no selfish motivation to get it working well and no way to test their changes even if they decide to take it up for the greater good” doesn’t seem like a good basis for a project where cross-platform compatibility is of the utmost importance. Git is great and it is used by a large number of projects (http://git.or.cz/gitwiki/GitProjects) but none of them seem to be Windows or Mac based. It might at least be wise to check beforehand if Git will really work well (and will continue to work well in the future) on all necessary platforms.

» Posted by Thomas Zander
 on Saturday, December 29, 2007 @ 17:31

@quintesse
I think its long been known that Windows has some good software, but as a system itself is not really nice to develop on. I’m not sure how much of an issue should be made out of KDE developers not having a similarly good experience developing on Windows due to sillynesses like filecapitalization and the various other things that Windows lacks in quality.

Or, in other words, do you see a good reason to go for the lowest common denominator? Especially since the amount of developers on Windows (again, for KDE!) is most certainly a lot lower then the amount of devs on Unix based systems ?

» Reply from Thiago Macieira
 on Sunday, December 30, 2007 @ 21:44
Thiago Macieira

I must add that several KDE developers have a similar attitude towards Windows. I know I do: I will stop at “this doesn’t break Windows”. Besides, I know Windows developers at Trolltech who use Git for their daily work and aren’t complaining. In fact, they’re helping develop the Windows port. I’m confident that, in about a year, it’ll be on-par with Linux usability-wise (nowhere as fast, though).



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.