hg convert from git doesn't follow renames

Paul Molodowitch elrond79 at gmail.com
Tue Nov 3 10:25:41 CST 2009


> There is no rename information to preserve. Git does not directly track
> renames, it infers them later:
>
> http://git.or.cz/gitwiki/GitFaq#Whydoesgitnot.22track.22renames.3F
>
> Mercurial currently uses more traditional explicit rename tracking.

Hmm... well, I certainly see how this would make it trickier to
implement, and I definitely prefer mercurial's approach - explicit
rename tracking - over git's - implied rename "guessing."  However if
you mean to claim that, simply because git doesn't do explicit rename
tracking, that upon conversion, hg SHOULDN'T have any rename info, I
have to disagree.  While git may not explicitly track renames, it does
(as that link says) have "support" for it, and many git users (myself
included) have come to rely on that support.  Yes, it's possible that
at some point the rename-detection may "guess wrong," but in practice
I haven't seen it do so thus far, so it works well enough to be a
usable feature.

The argument that hg shouldn't gather rename info from git repos when
converting is rather like the argument that, when translating from
Japanese (where nouns may be, and usually ARE omitted from sentences)
to English, nouns should be left out of the English translation.  Yes,
the fact that the Japanese leave out nouns means that you have to
"guess" at them; but, in practice, you can do a good enough job
guessing that it's rarely a problem; and, once you've moved to the
realm of English users, where nouns are explicit, most english users
would expect / want any "implied / guessed" nouns to be made explicit
in the conversion.

- Paul


More information about the Mercurial-devel mailing list