24 October 2008

rollback a changeset and shelve it

A little bit of history. I commit a changeset a while ago. A client doesn't want to see it in next release. So I like to extract my changes, but save it for future. Yep, my code in TFS.

There is no right-click-command to rollback changes. But! There is tfpt rollback from power tool. You need to run "tfpt rollback /changeset:N "from the source folder. This will take all latest from the server then present you a list of files from the changeset and roll-back it happy ever after. Your change extracted from the code base. Hey, how can I shelve it now?..

First of all it is quite scary to click "Rollback". There is no any kind of disclaimer what actually happen. What is it going to purge your changeset from the history? Nope. It will update your local files to the state they were before the changeset (somehow it will resolve conflicts if any) and you get list of files from the changset but in reverse direction which you can check in.

But there is no way to shelve a changeset.

Addition:
Actually there is one.
Check-in your changes (of roll back) and then note a change set you just created. Perform rollback again but with number of rollback operation. You will get a changes you rolled back which are actually changes you like to shelve. Shelve it. Smile and Enjoy for the moment. Then Undo this changes.