
On Wed, 2007-02-28 at 12:44 +0100, David Douard wrote:
- multiple branches in one repository (with recent mercurial, possible, but not nice at all)
I don't really understand what this mean. Could you please precise this point?
I often have many different features/patches I'm working on relative to trunk at once. I use "topic branches" to manage these.
With git and Mercurial, there are two ways to handle this: designate separate branches within a single working copy's repository and switch among them, or alternately, make a working copy for each separate task.
Git works well for the first approach, since it maintains branches as independent "head" cursors. Mercurial, on the other hand, implements branches as heads relative to ancestor tags, which breaks if the tagged revision ever becomes a branch point.
Both git and Mercurial try to work efficiently for the second approach, in that (at least on intra-filesystem clones) the history files in the two repositories are hard-linked. Mercurial's repository format means that the link is broken for an entire file's history once a new commit modifies it, so the space savings is quickly lost. Git, on the other hand, never breaks existing shared links because its history files are immutable.
- not having to type full repository paths all the time for pulls/pushes
Well, the .hg/hgrc file in your repository have a [paths] section one can fille with stuffs like:
Cool, that's what I was looking for. It'll come in handy.
- grafts
I do not know exactly how git-gaft works, but there are some tools in Mercurial, like transplant (an extension of hg) that may (at least partly) assert this.
Well, the main point is to let you pull only a subset of the full history without rewriting it. Grafts require that the history has originally been separated into disconnected chunks; with grafts, you can locally rejoin the segments you're interested in with synthetic ancestry links without having to rewrite any commits. Recent versions of git also support doing shallow (partial) clones, again without necessitating history rewriting.
-mental