A not so idle thought
Paul Moore
p.f.moore at gmail.com
Mon Oct 13 20:35:55 BST 2008
2008/10/13 Russel Winder <russel.winder at concertant.com>:
> All that I have understood of Mercurial -- which is clearly not enough
> -- is that a lot of work is actually working with multiple branches in a
> single repository, as is the case with Git. Clearly with Git it is
> possible to clone the repository locally to create new threads of work,
> but the Git idiom seems to be not to do this but to use the internal
> branches instead. In error it seems I had led myself to believe wrongly
> this was the same with Mercurial.
Named branches (multiple named heads within a single repository) are a
relatively new feature in Mercurial, and while some people seem to be
using them quite a lot, I don't believe they are the norm. Certainly,
Mercurial is designed around the principle of one branch per
repository.
In fact, Mercurial works hard to make the "branch=clone=copy" model as
effective as possible - it uses hard links to avoid file copying as
much as possible when cloning, so reducing the cost of cloning
significantly (this is even on Windows, when using NTFS). The result
is (as I understand it) many of the performance benefits of Bazaar's
shared repositories, without the restriction that branches need to
live in a single physical repository directory (something which
doesn't suit my working patterns).
> Shared repositories are not needed for working with branches and for
> small branches can be an awkward overhead and so not worth the hassle.
Sorry, I let my prejudices show :-) My impression (from limited
testing, plus what I read) is that shared repos are needed for
reasonable branch performance on larger-sized branches. I should have
been clearer. Ignoring performance, I believe Mercurial and Bazaar
have a very similar approach.
> Local lightweight checkouts can also be a useful tool for very quick
> experiments.
I never got used to these. Surely the fact that commits happen against
the master means that they are *not* useful unless you are happy to do
your whole experiment without committing?
> As others have pointed out, whilst I am a Bazaar and Git user, I haven't
> used Mercurial enough to contemplate pontificating -- so I had better
> stop :-)
No problem. Personally, I found that on first impressions, Mercurial
and Bazaar were pretty similar. But as you dig, subtle terminology and
conceptual differences start to become quite confusing and it gets
hard to see what's the same and what's different.
Paul.
More information about the bazaar
mailing list