Thoughts on Mercurial and Git

Alexis S. L. Carvalho alexis at cecm.usp.br
Tue Mar 27 12:19:10 CDT 2007


Thus spake Theodore Tso:
> On Tue, Mar 27, 2007 at 09:08:33AM -0500, John Goerzen wrote:
> > His main complaints against Mercurial seem to be:
> 
> I wouldn't call it complaints, really; rather that git has some
> nice-to-have things which that aren't in hg today, and which I happen
> to think are important.
> 
> For example, someone asked how hard it would be for me to implement
> "bk collapse", and it's somthing that I could probably implement in
> 15-30 minutes.  Part of this is because git was designed to be more
> easily extensible; part of this is because I'm not as up to speed with
> Python (which is not hg's fault); part of it is because hg's data
> store makes hg strip only work with significant limitations (if you've
> since pulled some other internal branches, and the changesets you want
> to collapse are no longer at the very end of the file so that
> truncation trick will work, hg strip won't work).   

Actually hg strip (from the mq extension) can also strip heads that are
no longer at the end of the file - it essentially creates a bundle with
everything that physically comes after the changesets you're removing,
truncates the files and unbundles that bundle, restoring those
changesets.

This is certainly more complex than the equivalent operation in git
(there's even a bug in a corner case in 0.9.3), but it's still possible.

Alexis


More information about the Mercurial mailing list