How to force a merge with an ancestor?

岁酱吖の 提交于 2019-12-11 11:48:20

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!