views:

19

answers:

2

I performed the following actions in TFS:

  1. Accidentally made some changes to a bunch of files in the trunk
  2. Realized it.
  3. merged the changes to the intended branch
  4. rolled back the changes in the trunk (using tfpt rollback)
  5. later, during the regularly scheduled forward integration from the trunk, I undid the changes in the branch.

How can I reapply the changes? There are three changesets and about 80 files in question.

+1  A: 

A couple ways to do this, but probably the quickest here would be:

  1. Check out the affected files (for edit) in the branch.
  2. Get Specific Version from trunk for those files.
  3. Copy those files to the appropriate branch directory.
  4. Check in.

You could also consider rolling back the rollback changeset in the trunk and redoing what you did (minus the undo).

Robaticus
There were so many changes. You could even say the most important part of the changes were the list of affected files.
steve_d
Yep. I've seen this happen. What works best in this situation is a clean workspace and a batch file.
Robaticus
A: 

What I ended up doing was a forced merge:

tf merge /r /force $/source/trunk $/source/branch1 /v:C123~125

I will watch this set of changes carefully when we reverse integrate back into the trunk.

I also tried a tricksy workflow of using tfpt to rollback, shelve, and unshelve /migrate. Unfortunately the conflict resolution dialogue in tfpt unshelve is a bit lacking - missing things like default buttons and stuff, so I had to mouse-click half a dozen times or so per file. So I decided after a few files to try something else first.

steve_d