stannius
stannius

Reputation: 1307

Re-do a batch of changes

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.

Upvotes: 0

Views: 1633

Answers (2)

stannius
stannius

Reputation: 1307

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.

Upvotes: 0

Robaticus
Robaticus

Reputation: 23157

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).

Upvotes: 2

Related Questions