Currently I have project consisting of multiple repositories, e.g.:
+---Project (main repo) +---Core (subrepo) +---Web (subrepo) \---Tests (subrepo)
Unfortunately the code between subrepos is quite coupled so it doesn't work nicely with branches.
Is there any way to consolidate the subrepos into one main repository preserving the history?
I would start with using hg convert
with a filemap that excludes the .hgsub
and the subrepos. Next, use hg convert
on the subrepos with rename entries in the filemap like: rename . Core
Once you have those new repos, you can use hg pull -f
to import the changesets from the converted subrepos into the converted main repo one at a time. You'll also need to merge them into your new main repo (they form separate heads with the null revision as the most recent common ancestor).
First guess : Perhaps by using the convert extension with a filemap ?
Another try :
Edit : added more details, and another try
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With