emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preferring mercurial


From: Stephen J. Turnbull
Subject: Re: preferring mercurial
Date: Fri, 10 Jan 2014 02:31:01 +0900

François Orieux writes:

 > My resume of all the posts I have read is that git and hg are
 > technically equivalent.

AFAICS they are very much *not* technically equivalent.  They may be
equal in power, especially at the UI level, but git exposes a much
cleaner interface to the internal model of blobs (file content), trees
(file directories), and commits *to the user*.

This means that git is more hackable: you can script it with shell,
you can script it with Python, you can script it with Emacs Lisp, or
you can write C.  Bzr definitely loses big here: the internals are
layer upon layer upon layer of complex Python API.  I don't know about
Mercurial, haven't looked at its internals.  Git invites you to play
with the DAG, just as Lisp invites you to play with lists.

Is this *better*?  That's a matter of taste.  But different?  Definitely.

 > Hg is cleaner, easier with better doc and ui

I disagree, but again it's a matter of taste.

 > with a bigger respect of history.

That is a lie, and you should stop repeating it, and tell people who
try to tell it to you to stop, too.

Nothing has more respect for history than git.  Using git, you can
forget history (by deleting or moving refs) but you can't change it or
delete it.[1]  That's why git doesn't have backups (the way hg and bzr
save bundles if you do a "commit --amend" or a "strip") for the
operations that fans of other VCS call "history-changing" -- it
doesn't need them.  History isn't *changed*, it is recreated -- and
the original history remains accessible to the user.  AFAIK hg and bzr
*do* destroy history when they perform operations like commit --amend,
strip, and rebase.  For sure, git *does not*.

It's true that you can alter the presentation of history in git
relatively easily compared to other VCSes.  But it's possible in them,
too, and (AFAIK) in them it does destroy original history in the
process of remaking it.


Footnotes: 
[1]  If you don't care about parts of history you've forgotten, git-gc
will eventually delete forgotten history -- and only forgotten history.
But because of the reflog, even if you forget, git won't, for at least
30 days (by default).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]