Sunday, March 6, 2016

Shelve and Unshelve Pending Changes

Shelve and Unshelve Pending Changes


Shelving enables you to keep the pending changes in your workspace or to share your code with other user for code review.

Steps to be followed:-

  1. You need to perform a Get Latest operation to synchronize your workspace with the latest versions of the files on the server.
  2. Build your application to make sure that it compiles before you shelve it or check it in. 

These steps needs to be followed in order to incorporate changes to versioned files that have been made outside your workspace.

To shelve folders and files from Source Control Explorer:-


In Source Control Explorer, right-click the file or folder, and then click Shelve Pending Changes.

In the Shelve - Source Files dialog box, type the shelveset name (for example, testshelve) in the Shelveset name box.

The Shelve - Source Files dialog box has two options:

  1. Preserve pending change locally.
  2. Evaluate Policies and check-in notes before shelving.
By default, first option is selected. When this option is selected, the changes you made to the files or folders in your local workspace are preserved.

When second option is selected, all check-in policies are evaluated before the shelveset is created. 

In the Comment box, type Testing shelveset, and then click Shelve.

All the files and folders are copied to the version control server and are available for other team members to unshelve.

To shelve folders and files from Solution Explorer:-


In Solution Explorer, right-click, and then click Shelve Pending Changes.

In the Shelve - Source Files dialog box, type the shelveset name (for example, testshelve) in the Shelveset name box.

The Shelve - Source Files dialog box includes two options:
  1. Preserve pending change locally.
  2. Evaluate Policies and check-in notes before shelving.

By default, first option is selected. When this option is selected, the changes you made to the files or folders in your local workspace are preserved.

When second option is selected, all check-in policies are evaluated before the shelveset is created.

In the Comment box, type Testing shelveset, and then click Shelve.

All the files and folders are copied to the version control server and are available for other team members to unshelve.

Unshelving


When you unshelve a shelveset, Team Foundation restores shelved revision to the destination workspace as a pending change.

To unshelve a set of pending changes:-

In Team Explorer, click File, point to Source Control, and then click Unshelve Pending Changes.
The Unshelve dialog box appears.

In the Owner name box, type the alias of the person who created the shelveset (for example, Shalu), and then click Find.

In the Results pane, select the shelveset you want to unshelve into your workspace, and then click Details.

In the Shelveset Details dialog box, if you want to delete the shelveset from the Team Foundation version control server, clear the Preserve shelveset on server box.

Select option, clear the Restore work items and check-in notes option if you do not want to restore the work items and check-in notes that are associated with the shelveset.

Select the shelveset or shelveset items that you want to unshelve into your workspace, and then click Unshelve.



No comments:

Post a Comment