Comparison with Git, Mercurial or Darcs?
Mark Williamson
maw48 at cantab.net
Wed Nov 4 14:47:49 GMT 2009
> > FWIW, Mercurial does record renames, whereas git does not record them at
> > all.
>
> Thanks, I didn't know that about Git.
>
> Just to make sure I understand you about Mercurial: The Bazaar website
> says that when you ask Mercurial to rename, behind the scenes what it
> really does is a delete+add. Is this correct? In other words, Bazaar
> and Darcs are special in that they actually record a rename as a
> rename.
Erk! I sense that by commenting on features I am likely to be stepping onto
slightly dangerous ground... ;-)
My *understanding* of git is that renames are not considered especially
interesting and are never recorded explicitly. However, various cases of
renaming can be detected with git commands, when you review the history. I
remember Linus posting stuff on this (including his personal argument that
renames aren't that interesting to record - but obviously not everyone
agrees!) a while back. I might be out of date on the specifics but I'd be
pretty surprised if git had started recording renames in the metadata (as
opposed to just an add + delete).
What I was stating about Mercurial is that it does *explicitly* record
renames. I think I'll stay away from commenting in this e-mail on how this is
represented internally since I don't understand it well enough. But the
history contains an entry saying "blah got renamed to foo". Unlike git. So
if you do it properly (i.e. you checked it in as a rename, not as a
copy/delete combo) the full and explicit history of renames is available in
the repository, not just a load of adds and deletes. I *think* there's an
additional flag to certain commands that will cause hg to follow these
renames.
Does that answer your question?
Cheers,
Mark
More information about the bazaar
mailing list