TLDR: I have an HG bundle with parent X, but revision X does not exist in my repo. However, I am sure that the files of revision Y are identical to revision X. How do I apply the bundle?
Background:
I use hgsubversion
to interact with an SVN repo.
There were some changes I did not want to commit. hgsubversion
does not support partial pushes.
I used to workaround by manually creating temporary exports/patch files, or manually restoring .orig files (result of hg revert
).
In this case I committed the changes I did not want to push, then used hg strip
, then pushed, then tried to use hg unbundle .hg/strip-backup/file
.
Problem: hgsubversion
replaces the original changeset with a new one it imports from SVN after it's committed it. Result: the changeset ID changes. This is a problem because now hg unbundle
no longer works, as it relies on the parent changeset being there (but it's been stripped).
Ironically, hgsubversion
itself uses strip
and thus has a backup file I can use to strip the new rev, add the stripped old revision, then apply the bundle with my revisions, export the patch, strip both, and restore the SVN revision. But this sounds... extremely painful and stupid. Is there nothing better I can do?
(hg transplant
doesn't seem to like the bundle without having the parent in the repo, either)