3

The process of creating a TFS Shelveset puts a copy of the file items on TFS server, for peer review and possible later check-in as a changeset.

Once a shelveset is created, the right click options are "View Shelveset Details", "UnShelve", "Delete ShelveSet" and "Review Request".

I wondered 2 things: What is the difference between "UnShelve" and "Delete ShelveSet"? What steps should I take to update an existing Shelveset with further development on the same set of files?

Am thinking, looking at other stack overflow pages that UnShelve will take the server copy of the files and overwrite the local file system files?

This UnShelve option is therefore not desirable, in my case, if I have further progressed development on files I have previously saved to TFS as a Shelveset as I will overwrite and lose my recent changes?

I wondered if the unshelve action prompts any file overwrites if the filesystem file(s) are newer than the TFS shelveset version?

I guess I could take a copy of files content and try this option.

https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/suspend-your-work-manage-your-shelvesets?view=azure-devops

https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/unshelve-command?view=azure-devops

I saw another stack overflow page that mentioned creating a new Shelveset with the exact same name does an update:

how to update existing shelve set in tfs

Another option is to delete the shelveset and create a new one.

Allan F
  • 2,110
  • 1
  • 24
  • 29

1 Answers1

5

I guess the answer is thus these steps:

1) View the current Shelveset and copy the shelveset description to clipboard,

2) Right click at a "high enough" point in the "Source Control Explorer" and choose the "Shelve Pending Changes" right click option,

3) Examine the Included and Excluded Changes items list and make sure you are happy with what is included and excluded,

4) paste, from clipboard of step 1 to the required shelveset name entry item,

5) Choose "Yes" to the "Replace shelveset" pop-up prompt dialog form.

Allan F
  • 2,110
  • 1
  • 24
  • 29