Reputation: 4472
My scenario is as follows.
The project I have cloned from was originally versioned using Mercurial and I have a clone of that original repo with all it's history. At a certain point in time the owner of the project decided to move to GitHub but has lost all the history in the move so this new repo, although it's a continuation of the old project, is effectively starting anew from revision 0.
I want to stick with Hg, and Hg-Git will obviously allow me to pull from the Git repo, but what I don't know how to do is to stick together the head of the Hg repo with the tail of the Git repo so I can just carry on pulling down regular updates as before. The actual commit in Git that matches the head of the Hg repo is not the first commit, so it's not the tip of the tail.
I thought that hg convert and --splicemap might be useful, but the more I've read about it the less it looks like a solution for me.
Can anyone offer any suggestions as to how I can achieve this?
Update
Just for the information of anyone who might be trying to do something similar, I finally managed to achieve the result I wanted but it was a long and winding road, and it turns out that hg convert and splicemap was the answer after all.
It's unpleasant, it's long winded and it was a bit of a nightmare to set up, but it works cleanly now and my final repo is a predictable and reasonable size.
Upvotes: 3
Views: 347
Reputation: 511
Never tried this, but maybe manipulating the git-mapfile in /.hg of the bridge-repo could work. I'd try it like so:
Could be complete nonsense, but at least the older ("dumber") versions of hg-git simply determined necessary git objects via this map file. So it would be worth a try...
Upvotes: 3