git-remote-hg icon indicating copy to clipboard operation
git-remote-hg copied to clipboard

hg revisions created from git commits lack file rename and copy metadata

Open mnauw opened this issue 8 years ago • 2 comments

The 2 systems, git and Mercurial, are obviously different here. Git does not really track any move and copy meta-data, it just finds out about that (with more or less effort) when traversing history. Mercurial, on the other hand, does track such metadata and relies on it when following a file's history.

As no such move and copy metadata is added to the generated hg changesets, performing a file move in a git commit which is then pushed to Mercurial will break that file's history, as opposed to what would happen in a native hg revision.

mnauw avatar Aug 01 '16 12:08 mnauw

The issue described is a limitation of using the export capability in a remote helper.

The above commit (optionally) makes the remote helper use the push capability, and that allows fixing this issue. In fact it also allows to overcome various other limitations as is done in subsequent commits (such as up to mnauw@1d0c78eebc4ff6fbc933f98a0d903d4e95839dc4)

mnauw avatar Aug 01 '16 13:08 mnauw

This is certainly something that is very useful, however, I don't quite understand the patch. How is that allowing the metadata?

There are plenty of ways to store the metadata (including renames), however I don't see yet a very good one.

felipec avatar Jun 04 '19 13:06 felipec