Bookmarks - Tutorial / Git comparison

Daniel Carrera dcarrera at gmail.com
Mon Jul 12 12:21:29 UTC 2010


I'd like to make a public correction:

An important design feature of Mercurial is that it will never delete
or overwrite a revlog out of concern for data safety. Therefore, the
only way to perform a "destructive" operation in Hg (e.g. delete a
branch) is to use clones. The only exception is rollback - this is the
only Hg command capable of losing data.

This is an interesting design decision, and it points to a difference
between Git and Hg:  If you *want* to destroy data, Hg does require
you to use clones. Whereas Git is willing to perform destructive
operations on its own.

Destroying data is the only way in which Mercurial might require you
to use clones.

Daniel.

2010/7/12 Daniel Carrera <dcarrera at gmail.com>:
> 2010/7/12 François Gannaz <francois.gannaz at free.fr>:
>> I'm not an expert at Mercurial, but I think I understood a major difference
>> between hg and git: Mercurial prefers workflows that use several (cheap) clones.
>
> I do not think that Mercurial in any way prefers clones. You might
> argue that clones work better than in Git (e.g. if Git doesn't use
> hard links, or if some features in Git don't work with clones - like
> cherry picking). But this is very far from saying that Mercurial
> *prefers* clones. It doesn't. It just doesn't punish you for using
> them.
>
> Daniel.
> --
> No trees were killed in the generation of this message. A large number
> of electrons were, however, severely inconvenienced.
>



-- 
No trees were killed in the generation of this message. A large number
of electrons were, however, severely inconvenienced.



More information about the Mercurial mailing list