Convert changeset(s) to shelveset

orange picture orange · Jan 15, 2014 · Viewed 11.5k times · Source

Is it possible to create a shelveset from the diff of two versions of one branch just by some operations in tfs/tfpt?

e.g. create a shelveset from (changeset 2013 -> changeset 2034)

Answer

Lee Richardson picture Lee Richardson · Aug 14, 2014

It is possible to create a shelveset from a changeset with some limitations. I needed to rollback a change from a branch to remove it from a release but it wasn't in any other branch either so I wanted to keep the change in a shelveset. I achieved this as below:

  • Rollback the changeset and check in the rollback.
  • Rollback the rollback changeset. This gives me a set of pending changes containing the original change.
  • Shelve the pending changes.

You could apply this technique to the case described in the question but it would be a lot of manual effort as it would have to be repeated for every changeset. It would also generate a lot of mess in TFS as you would have to check in the rollbacks of the rollbacks too.