Merging Unrelated Repositories in Mercurial

Mar 27th, 2013

Some time ago I had some projects which I wanted to combine in one big project and keep history for all of them. This can be done following to this article. But if I’ll use this solution in result I’ll have more than one tails (how it illustrated in picture below).

After some hours with console magic I found solution, and I want to share it.

I decided to modify history to avoid possible merge conflicts. I moved all files in each project to appropriate subfolder (named as project). To do this we needs to export patch and modify it to change pathes.