Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mnauw opened this issue Aug 1, 2016 · 2 comments
Open

Comments

@mnauw
Copy link
Contributor

mnauw commented Aug 1, 2016

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 added a commit to mnauw/git-remote-hg that referenced this issue Aug 1, 2016
Push capability is used depending on remote-hg.capability-push setting and ...
* handles dry-run properly,
* passes copy and rename information onto Mercurial

Fixes felipec#61
@mnauw
Copy link
Contributor Author

mnauw commented Aug 1, 2016

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/git-remote-hg@1d0c78e)

@felipec
Copy link
Owner

felipec commented Jun 4, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants