Reputation: 87773
I have a project that sometimes branches out for a time. I don't use named branches.
I then use Merge in order to pull the branch back together. So given a tree like this
o Change 3 on Branch B
║
o Change 2 on Branch B
║
║ o Change 1 on Branch A
╠═╝
o Source
I can merge in Change 2 like this
o Merge of change 2 into Branch A
╠═╗
║ ║ o Change 3 on Branch B
║ ╠═╝
║ o Change 2 on Branch B
║ ║
o ║ Change 1 on Branch A
╠═╝
o Source
But what would be the recommended way to copy/merge Change 3 into Branch A, without merging its parents? (specifically, without merging Change 2)
The way I do it now is to manually compare the difference between 2 and 3, and repeat the changes in a number 4.
Upvotes: 3
Views: 161
Reputation: 97270
Because you already merged Change 2 on Branch B
and Change 3 on Branch B
is single unmerged cset in branch, you can just merge branches again
In case of "merge only some unmerged changeset from branch to branch" you have to use graft, as mentioned (in fresh Mercurial) or transplant
Upvotes: 1