I have a repository named repo1, and it's my base.
I clone it into repo2.
I have another repository containing some unrelated files and history, named other_repo.
Thanks to hg convert
, I can import a subset of other_repo into repo2, while keeping the history of the files:
hg convert --filemap my_file other_repo temp_repo
cd repo2
hg pull -f temp_repo
This is working flawlessly.
However, now, if I bundle the changes in repo2, and try to unbundle them in repo1, I get the following error:
adding changesets
transaction abort!
rollback completed
abort: 00changelog.i@82dc9cd3be46: unknown parent!
Well, that's normal. The new parent comes from the other_repo, and it is needed now. Note that hg pull in repo1 from repo2 is working fine.
In such a case (when the repository's history is fine, hg verify
doesn't complain, I didn't strip anything), is there a way to force the unbundle action?
No, there isn't.
The bundle is a diff between the parent and the child, you only got the changes, and without the parent, you can't reconstruct the child changeset.
So get the parent into the repository before you try to unbundle.
Or create a new bundle, without that changeset.
Or, do some history rewriting in the source repository first, so that you don't need the parent.
Regardless, you can't force this to complete without rethinking your approach.
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