I want to review some fellow's code. But the thing is that I would have to sit with him for that. This would definitely depend upon his availability. Can I do it from my PC? Sure you can!
For that he has to check-in his code.
But I don't want him to check-in his code because it hasn't been reviewed.
This is a general discussion that we used to have before Microsoft introduced a new concept in Visual Studio. A developer can make his code available for others even when he doesn't want it to be part of the checked-in clean code. This is called 'Shelving'. We would be discussing about it today.
Besides reviewing, it also keeps the code from being picked up by automatic build process which might be triggered at each check-in checking the sanity of the code.
Just right click the code file / project or solution. As you know it provides various options including the options related to source control like getting latest version and comparing the local code with version of code on the source control.
If you look closely, then you might find two new options. They are as follows:
1. Shelve Pending Changes
2. Unshelve Pending Changes
These options would provide shelving facility within source control in Visual Studio Team System.
This option is also available when you want to view pending changes. Just look at the window opened when you choose that option and notice the changes incorporated in order to support shelving of the code.
As you might know that, in Team System Source control, code is organized in terms of workspaces. You might want to evaluate policies and check-in notes before shelving the code. This option is also provided by the Team System.