-
Notifications
You must be signed in to change notification settings - Fork 258
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
yet another issue on unnamed heads #220
Comments
Are you aware if @chrisjbillington's hg-export-tool (it is mentioned in the Notes/Limitations section of the readme)? I think it will give you a git branch for each Mercurial head . |
We have a similar issue on a third-party repo that has loads of unnamed heads, mostly due to closed/reused branches. Was considering whether to add a Thoughts? @dedabob Have you considered extending hg-fast-export to create additional branches for hg bookmarks? |
Pro Git book pointed me to this tool, so I didn't look for alternatives. I gave @chrisjbillington's tool a try. It amends head commits, which means it strips those commits and creates new ones, so it's fine if changing the history is not a problem. I'm going to try hg-git. It seems to ignore branches and just export mercurial bookmarks to git branches without changing the history, which is the feature of issue #61. @sschaap, check if it's suitable for your requirements. |
As this basically seems to be a duplicate of the feature request in #61, I'll close this issue. |
We started migrating our mercurial repositories to git ones and we got stuck into the problem of unnamed heads. This problem has been discussed in closed issue #9 but i think it's related to open issue #61. Basically we have been using mercurial bookmarks as git branches.
To migrate those repositories we are emulating forks to have a git branch for each mercurial head.
The process is based on getting the common ancestors of the heads (using mercurial APIs), clone and fork them, The forks are then added as remote repositories just to get their branches and removed afterwards. It does not uses the force option and does not require extra commits, which avoids closed mercurial branches to pop up.
Down below are the commands executed to successfully export a repository with revisions 849 and 879 as heads and revision 827 as common ancestor. I guess they can be simplified and automated.
Note: We brutally copied the folders as a work-around to issue #114.
The text was updated successfully, but these errors were encountered: