Hans Then
Hans Then

Reputation: 11322

How to move versions of files between branches

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?

Upvotes: 3

Views: 95

Answers (2)

smooth reggae
smooth reggae

Reputation: 2219

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)

Upvotes: 0

Mark Tolonen
Mark Tolonen

Reputation: 178369

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

Upvotes: 2

Related Questions