Archive for mercurial

fed up with Mecurial named branches, on to git

Posted in Uncategorized with tags , , , on December 13, 2008 by dlamotte

I finally gave in and switched my hosting of dotfiles from bitbucket to github.  I am absolutely sick of dinking around with named branches in mercurial.  Its just far too much work to get the job done.  I’m hoping git is slightly better.  It seems like it is.

I’m actually still a mercurial fan, but there seems to be a much larger community behind git.  I think a few years of maturing will do Mercurial good.  Maybe it’ll drop the named branches idea and side with git.  I’d like that :) .  I’m not sure I like how complicated it makes things.  I’m not sure how named branches is any different from having multiple heads constantly.  Oh well.  I will still fight for mercurial, but git is by far more mature, so it looks like I’m stuck with it.

[update] I was kind of running out the door when I wrote this, so maybe I should expound on why I switched from Mercurial to git.

First off, community support of git has really helped the community.  So much so, that github offers as many repositories as you like up to 100mb (which I hear can be upped if you need it).  Bitbucket, among other providers, only provide one repository.  While that may change, it was one of the main points in my switch.

Secondly, Mercurial is quite painful to maintain named branches, like I stated earlier.  Let me lay down the situation.  I have dotfiles on my home box which get modified for work use.  While they share many things, there are things that I need specifically for work and things which I can assume on my home box.  So in this way, I need to maintain two different branches of my dot files.  When I make a change to one, I’d like to port that change to the other.  I was using the transplant extention heavily with mercurial.  In git, its called cherrypicking.  The difference between cherrypicking a change with git and a change with mercurial comes down to one minor difference.  With mercurial, its very strict about its merging.  In mercurial after you transplant, you need to merge the named branches together or you have a multiheaded repository that cannot be pushed to the server.  The merge actually doesn’t merge any files, it just merges the Mercurial tracking which gets really annoying. Git doesn’t require this.

Thirdly, I’m not thrilled with how mercurial requires multiple directories which forces people to copy the working directory multiple times to branch.  At first, I didn’t believe it to be a big deal, but when your working tree is >400mb or even 2gb, this is a huge hassle.  It takes extra unneeded disk space.  Git handles this gracefully with its branching and remote tracking branches.

As for some of the questions about: In what way is git more mature? More feature complete? Better performance? More tools and supported platforms for these tools?

Git does have more features and better performance, but Mercurial will eventually have these also.  My decision is not soley based on features and performance as both can be fixed over time.  The main part of my decision is based on Mercurial’s decision to track files (not content), named branches and required cloning as a means for temporary branches, and the annoying feature that requires merges not due to actual code/content, but due to its internal tracking tree.

Don’t quote me on that last comment as far as the internals go, but I’m fed up with having to do hg merge and not actually merge anything, but just to satisfy the Mercurial internals.  That is a design decision that may take a while to work through and probably won’t be fixed ever.

I find this all very sad because honestly, I prefer the Mercurial project in so many other ways.  I absolutely love how easy it is to make plugins.  The plugin system is amazing.  The actual code is very well organized and really proves how python, as a scripting language, can still have performance.  It’s very extensible and things are much cleaner (IMO) in the backend than git.  Git seems more like a conglomerate of bunches of code which makes it feel less organized.

Even platform support is better for Mercurial, although I know there are some git fanatics out there getting it working on Windows (which rocks).

All in all, I love Mercurial on most levels, but I’m sick of fighting with it to get my job done.  I want branches like git has.  I want flexibility like git.  I just wish I didn’t have to use git, to get it.

my dot files so far

Posted in Uncategorized with tags , , on August 21, 2008 by dlamotte

So I’ve read a few other blogs where people have started posting their dot files to publicly accessible VCS’s.  I thought that was pretty cool and learned a few things from other’s dot files so I am doing the same now.

I prefer mercurial so I’ve uploaded my dot files here.

(Thanks to Ciaran McCreesh as his blog post about this and some of his dot files inspired me to do the same.  Along with the Makefile idea that I expounded on a bit. )

Follow

Get every new post delivered to your Inbox.