Re-do a batch of changes
开发者_如何学JAVAI performed the following actions in TFS:
- Accidentally made some changes to a bunch of files in the trunk
- Realized it.
- merged the changes to the intended branch
- rolled back the changes in the trunk (using tfpt rollback)
- 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.
A couple ways to do this, but probably the quickest here would be:
- Check out the affected files (for edit) in the branch.
- Get Specific Version from trunk for those files.
- Copy those files to the appropriate branch directory.
- Check in.
You could also consider rolling back the rollback changeset in the trunk and redoing what you did (minus the undo).
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.
精彩评论