Monday, 25 October 2010

Under Control

After all this work, it was about time to set up proper version control. Central VCS are out, it's all about DVCS these days. So there are the big two, Mercurial and Git. This comprehensive comparison here aligns Git with McGyver, which makes it instantly interesting for me as a die-hard fan. Yet, it's not the 80s and I'm not in highschool anymore, having unlimited time to play around with things. So I go for James Bond, aka Mercurial. The hosting choice for that is BitBucket - nice enough, it's free for my use. Setting up an account is painless.

Ok, now what... using Eclipse, there should be a plugin for that. I've heared rumors that the tool support for Mercurial is not as good as for Subversion. Now the tool support for Subversion, at least in Eclipse, is... abysmal, broken, fubar. So it can only get better, can't it?
At least this time, there's only one plugin around. And after convincing it that I don't want a commercial tools suite and Windows DLLs installed (no, thank you, I'm running Linux here, put these where the sun does not shine), things look not so bad.

So now I've got some eclipse projects, a shiny new account at BitBucket, a repository with a URL, so let's go and import stuff. But first, I'm greeted with an error message when starting Eclipse. Apparently, I still need the Mercurial binaries to get the whole shebang to work. I dawns on me what these Windows DLLs were for...

Ha, I use Linux, I don't need fancy automatic install. Open terminal, run apt, install Mercurial, done. I bet with Windows I'd have to reboot now. Take that, monopolist! And behold, Eclipse doesn't complain anymore as well. All good.

Well, nearly all. How am I going to get the projects into BitBucket? Apparently, I have to commit against a local repository first. Well, DVCS, kind of makes sense. After twiddling apart stuff in source and target folders (come on, Eclipse knows what's what, why can't the plugin?), I successfully commit.

Now it's still not in the BitBucket repo. Push is next on the list. But wait, I don't want my sources directly in the repo, project should be the top level. That didn't work... there's no way to delete things from the repo, or at least I haven't found any. So I just kill off the repo itself and start over.

Next try, I clone the repo to a folder in my workspace. Now I'm just moving the projects into that folder, and I can commit... er, push properly. That did the trick, I've got a neat list of my projects in BitBucket now.

No comments:

Post a Comment