3

I am using Mercurial. I have a file X that has two versions in two different branches. I have a version in the R1 branch and an updated version with bugfixes in the R0 branch. I have merged the fixes from R0 into R1, but somehow file X was not properly merged.

I now want to move the version of X that is in my R0 branch into the R1 branch.

How can I do this?

4

2 回答 2

2

Update to the target branch, revert the file to the the revision of the other branch, then commit.

hg update R1
hg revert -r R0 X
hg commit
于 2012-10-18T20:02:18.850 回答
0

Consider graft as well (NOTE: I don't know enough about the state of your repository after the merges, but graft has helped me when I had to transfer changesets from one branch to another)

于 2012-10-18T22:21:46.283 回答