问题
I branched off changeset "A". Later, "A" was merged into default. Then it was decided that "A" was not ready to go live, so someone hg revert -a'd it to an older revision and pushed that. Now I'm trying to merge default into my branch, but because those changes were reverted, they're all being ripped out of my branch.
I want to force a re-merge with "A" so that I can get all those changes back. How can I do that?
Update: I just tried backing out the changeset that undoing "A" was made on. It looks like this gave me all my code changes back.
回答1:
It looks like you solved your problem already. I was going to point you to http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html and then mention that you try to "hg revert" the commit that previously reverted the changes you want back.
回答2:
Instead of trying to re-merge "A" you can backout the changeset where "A" was undone on default. e.g.,
hg backout -r <changeset>
来源:https://stackoverflow.com/questions/17282199/how-to-force-a-merge-with-an-ancestor