So I fixed a bug on our main branch some months back, let’s say some old changeset 555. Recently, I manually copied these changes to a child branch for a recently approved hotfix, changeset 999. I would like to do a Track Changeset on 999 and see this it has been merged to main as 555. But, I’ve done this backwards according to the TFS rules, you can’t merge down to a child branch.
Is there a way to tell TFS “accept my old changeset 555 as the merge of 999 to the main branch”?
This is analogous to the ClearCase version tree workflow, using the “don’t perform merge, just draw arrow”. Thus the Track Changeset for either 555 or 999 would show that they are related.
I’m not sure what you mean by
There shouldn’t be anything preventing you merging this change to a child branch, you might have some merge conflicts to resolve. However if that really isn’t a possibility and you want to merge “999” in to the main branch without actually merging the code (i.e. adjust the merge history) then you can using the
tf mergecommand line.Open a visual studio command prompt and use the command
tf merge $/TeamProject/childBranch $/TeamProject/MainBranch /version:C999~C999 /recursive /discardThis will tell TFS to update its history to say that the merge occured even though it hasn’t. You might want to use the
/previewswitch before you do the merge “for real” to make sure you are discarding the files you expect.