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

hg2git-mapping changes after each run? #114

Open
emilianbold opened this issue Mar 12, 2018 · 1 comment
Open

hg2git-mapping changes after each run? #114

emilianbold opened this issue Mar 12, 2018 · 1 comment
Labels
contribution-required Maintainer has no time and/or no plans to work on this, interested parties should submit a patch feature-request This is a feature request patches-welcome The reporter is welcome to submit a patch to fix the reported issue

Comments

@emilianbold
Copy link
Contributor

Hello,

I'm maintaining a Git repository[1] that tracks a Mercurial repository[2] still getting commits.

This works well, except for my 'backup' system: I figured that it might be a good idea to save the hg2git-* files, in case I need to move this incremental conversion over to another machine.

1st question: Do I really need to save hg2git files or can I safely resume the incremental conversion on another machine with less work? (Meaning, are the existing mappings picked-up from the git changeset themselves or something?)

2nd question: hg2git-mapping changes entirely after each run. I would have expected the file to get only some new lines as new commits are converted. But it seems to ordering of lines is random so the diff is huge. Wouldn't it make sense for entires in hg2git-mapping to be sorted or for the file to be append-only somehow?

  1. https://github.com/emilianbold/netbeans-releases
  2. http://hg.netbeans.org/releases/
@frej
Copy link
Owner

frej commented Mar 16, 2018

Hg-fast export is pretty dumb and needs the hg2git-* to know where to continue during incremental imports.

A nice feature of fast-export is that although it needs the hg2git-* files to know where to continue, it (provided branch and author mapping files are unchanged) will always produce the same git repo. So if everything fails and you have to start over from scratch, you can do so and the git hashes will be the same as if you had done an incremental import in multiple steps.

hg2git-mapping is just a dump of a hash table, so fast-export does not care about the order. save_cache in hg2git.py is where the dumping is done, I would not hesitate to merge a patch which sorts the keys before dumping, hint hint...

@frej frej added feature-request This is a feature request contribution-required Maintainer has no time and/or no plans to work on this, interested parties should submit a patch labels Apr 27, 2018
@frej frej added the patches-welcome The reporter is welcome to submit a patch to fix the reported issue label Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution-required Maintainer has no time and/or no plans to work on this, interested parties should submit a patch feature-request This is a feature request patches-welcome The reporter is welcome to submit a patch to fix the reported issue
Projects
None yet
Development

No branches or pull requests

2 participants