<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>SourceGear Development Blog: Shelve</title>
    <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Upcoming changes and additions to SourceGear products</description>
    <item>
      <title>Shelve</title>
      <description>&lt;p&gt;&lt;h4&gt;Introduction&lt;/h4&gt;  &lt;p&gt;We&#8217;ve been talking about Shelve for a while, and lots of customers have been curious about how Shelve will work in Vault and Fortress.&amp;#160; For Shelve, we&#8217;re writing the user documentation first, before we write a single line of code.&amp;#160; This has been a really helpful exercise, since we&#8217;ve had to talk through a lot of issues that would have been surprises in a more technical-focused spec.&amp;#160; The goal of this documentation is clarity and completeness.&amp;#160; Please complain in the comments section if anything is confusing at all.&amp;#160; &lt;/p&gt;  &lt;h4&gt;Overview &lt;/h4&gt;  &lt;p&gt;&lt;b&gt;Shelve&lt;/b&gt; is a feature which allows you to upload a set of changes in your working folder to the Vault server without committing them. In order to commit these shelved changes (called a &lt;b&gt;shelveset&lt;/b&gt;), you must first &lt;b&gt;unshelve&lt;/b&gt; them to a working folder. After unshelving the changes, you may commit them just as you would a normal changeset. Some cases where shelve is useful are: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;Archiving changes&lt;/b&gt;. If you are interrupted while working on a task, shelve allows you to set aside your changes and come back to them at a later time. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Sharing change before checkin (code review)&lt;/b&gt;. All shelvesets are visible to all users with access to that repository. By informing your reviewers of the name of your shelveset, they can unshelve it to their working folder, or view the shelveset in the web client. &lt;/li&gt; &lt;/ol&gt; &lt;a name="What_kinds_of_changes_can_be_shelved.3F"&gt;&lt;/a&gt;  &lt;h4&gt;What kinds of changes can be shelved? &lt;/h4&gt;  &lt;p&gt;All pending change types can be shelved. Special care should be used when shelving Rollback, as versions may have been added since the Rollback was shelved. On committing an unshelved Rollback, the contents of those versions would be rolled back as well. &lt;/p&gt;  &lt;p&gt;&lt;a name="Finding_the_Shelve_Functions."&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;Finding the Shelve Functions. &lt;/h4&gt;  &lt;p&gt;You will find Shelve functions in the following places &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;The Pending Changes Control&lt;/b&gt;. This control is found in the Visual Studio Enhanced Client (How to bring it up), the Eclipse client (where to find it) and the standalone GUI client (in the Pending Changes tab). There are two shelve related buttons. You may also bring up the Shelve Changes dialog by selecting a set of changes and selecting Shelve&#8230; from the context menu.       &lt;ol&gt;       &lt;li&gt;&lt;b&gt;Shelve&#8230;&lt;/b&gt; This button will bring up the Shelve Changes dialog. &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Unshelve&#8230;&lt;/b&gt; This button will bring up the Find Shelveset dialog. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;b&gt;View Shelved Changes&lt;/b&gt;. This menu item is available in the View menu of the standalone GUI client. This menu item will bring up the Find Shelveset dialog. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;The File and Folder lists&lt;/b&gt;. The file and folder controls in the standalone GUI client will have context menu items to bring up the Shelve Changes dialog. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;The Command Line Client/NAnt/Ant&lt;/b&gt;. These components all have shelve and unshelve commands. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Source Control Web Client&lt;/b&gt;. Each repository will have a page for Shelved changes. Here you may view the shelves, their details and diff their file changes. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a name="The_Shelve_Changes_Dialog"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;The Shelve Changes Dialog &lt;/h4&gt;  &lt;p&gt;&lt;a href="http://vaultblog.sourcegear.com/files/ShelveChanges_2.png"&gt;&lt;img title="ShelveChanges" height="435" alt="ShelveChanges" src="http://vaultblog.sourcegear.com/files/ShelveChanges_thumb.png" width="500" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This dialog is used to create a shelveset from a set of pending changes. In this dialog, you will see the list of currently pended changes. If you brought this dialog up using the context menu in the Pending Changes control, you will only see the list of changes that you had selected there. You may enter the following information about your new shelveset. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;Shelveset name&lt;/b&gt;. This name must be unique among all of your shelvesets. If you reuse a shelveset name, you will be prompted to confirm that you wish to delete the existing shelveset and create a new one with the contents you select here. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Changes&lt;/b&gt;. In the change list section, any changes that are checked will be included in the shelveset. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Comment&lt;/b&gt;. You may enter a comment that will be retained inside this shelveset. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Work Items (Fortress only)&lt;/b&gt;. You may select a list of work items to update. The work items will link back to this shelveset. This way, any other users who wish to review your changes can use the work item as the hub to find all of the relevant shelvesets. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Undo changes in my working folder&lt;/b&gt;. This checkbox will inform Vault to undo the changes when the shelveset has been uploaded. The default is unchecked. You may change the default setting for this checkbox in the Options dialog.&amp;#160; &lt;/li&gt; &lt;/ol&gt; &lt;a name="The_Find_Shelveset_Dialog"&gt;&lt;/a&gt;  &lt;h4&gt;The Find Shelveset Dialog &lt;/h4&gt;  &lt;p&gt;&lt;a href="http://vaultblog.sourcegear.com/files/FindShelvesetWithContextMenu_2.png"&gt;&lt;img title="FindShelvesetWithContextMenu" height="332" alt="FindShelvesetWithContextMenu" src="http://vaultblog.sourcegear.com/files/FindShelvesetWithContextMenu_thumb.png" width="520" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This dialog is used to browse the shelvesets for a repository and get basic details about them. The controls are as follows: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;The User dropdown&lt;/b&gt;. This dropdown will display a list of all active users with access to the repository. Your user name is selected by default in this dialog. Selecting the first item in the dropdown (named &#8220;all&#8221;) will show all shelvesets from all users. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;The Find Button&lt;/b&gt;. Clicking this button will populate the Shelveset list for the user selected in the user dropdown. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;The Shelveset List&lt;/b&gt;. This list will display all of the shelvesets for a selected user. The displayed columns are shelveset name, date, and comment. Selecting a shelveset in this list will activate the Details button. You can unshelve the selected shelveset through the Shelveset Details dialog (opened by selecting a shelveset and clicking the Details button). The following operations are available in the context menu of The Shelveset List.       &lt;ol&gt;       &lt;li&gt;&lt;b&gt;Details&lt;/b&gt;. View the details for the shelveset. (Double-clicking an item will also activate this action.) &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Rename&lt;/b&gt;. Rename the shelveset. Renaming a shelveset will not affect the shelveset creation time. You may only rename your shelvesets. (F2 is a shortcut for this action.) &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Delete&lt;/b&gt;. Delete the shelveset. You many only delete your shelvesets. (The delete key is a shortcut for this action.) &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;When Diffing shelvesets, the Find Shelvesets dialog expands to allow you to select two shelvesets.&amp;#160; The Diff function will fetch both shelvesets to a temporary directory and perform a folder diff.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://vaultblog.sourcegear.com/files/FindShelvesetDiff2_2.png"&gt;&lt;img title="FindShelvesetDiff2" height="167" alt="FindShelvesetDiff2" src="http://vaultblog.sourcegear.com/files/FindShelvesetDiff2_thumb.png" width="519" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;a name="Shelveset_Details"&gt;&lt;/a&gt;  &lt;h4&gt;Shelveset Details &lt;/h4&gt;  &lt;p&gt;&lt;a href="http://vaultblog.sourcegear.com/files/ShelvesetDetailsWithContextMenu_2.png"&gt;&lt;img title="ShelvesetDetailsWithContextMenu" height="554" alt="ShelvesetDetailsWithContextMenu" src="http://vaultblog.sourcegear.com/files/ShelvesetDetailsWithContextMenu_thumb.png" width="517" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This dialog will display the contents of a shelveset and allow you to unshelve it. For more help on unshelving a shelveset, see &#8220;How do I unshelve my changes?&#8221;. Please note that a shelveset may contain changes to paths that you have been denied permission to see by the Folder Security settings in the admin web client. This dialog will only show changes that you have permission to view. A warning dialog will be shown to alert you when items you did not have permission to view have been omitted from the details you are about to view. Unshelving the shelveset will only unshelve changes that you have permission to view. &lt;/p&gt;  &lt;p&gt;This dialog has the following controls: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;Shelveset name&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Shelveset owner&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Shelveset comment&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Shelveset time.&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Web Client link&lt;/b&gt;. Clicking this link will open a web browser to this shelveset in the Source Control web client. Right-clicking this link will present a context menu to Copy the URL to the web client. Emailing this URL is another good way to facilitate a code review of this shelveset. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Work Item links (Fortress Only)&lt;/b&gt;. A list of links to work items that were referenced by the shelveset. Basic information about these items will be listed along with a link. Clicking any of these links will open a item browsing dialog to the referenced work item in the Item Tracking client. If an associated work item has been deleted by an administrator, it will not appear in this list. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Automatically delete shelveset after I unshelve it&lt;/b&gt;. This checkbox will cause the client to delete the shelveset after it has been successfully unshelved. If any of the files could not be unshelved or if there were any namespace conflicts during the unshelve process, the shelveset will not be deleted. This checkbox is only enabled if you are the owner of the shelveset. This checkbox will be disabled unless all changes in the Shelveset contents are checked for unshelving. This checkbox will also be disabled if changes have been omitted from the contents due to permissions. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Shelveset contents&lt;/b&gt;. This control will list all of the pending changes. When the unshelve button is clicked, only items which are checked in this control will be unshelved. The following details will show in this list       &lt;ol&gt;       &lt;li&gt;&lt;b&gt;Name&lt;/b&gt; &#8211; the name of the effected folder or file. &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Repository Path&lt;/b&gt;. This is the repository path at the time of shelve. &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Details&lt;/b&gt; &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Pending Change Type&lt;/b&gt; &lt;/li&gt;        &lt;li&gt;&lt;b&gt;Comment&lt;/b&gt;. This is the comment put on this pending change before it was shelved. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The following operation is available from the context menu. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;Diff&lt;/b&gt;. If a pending change has file content changes associated with it, you may choose this menu item to bring up the Diff dialog. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;View&lt;/b&gt;. This item will allow you to view edited or new files (add file operations). Choosing this dialog will bring up the View dialog. &lt;/li&gt; &lt;/ol&gt; &lt;a name="How_to_unshelve_changes"&gt;&lt;/a&gt;  &lt;h4&gt;How to unshelve changes &lt;/h4&gt;  &lt;p&gt;Once you&#8217;ve used the Unshelve button in the Shelveset Details dialog, the unshelve process will begin. You will be asked to make decisions when complications arise in the unshelve process. Any of these complications will negate the &#8220;Automatically delete shelveset after I unshelve it&#8221; setting. Some complications are: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;There is no working folder set for the destination of one of the items in a shelveset. You will be prompted to set a working folder, or to unshelve to non-working folder. No baseline information will be set in the non-working folder case, so you will not be able to check in that change. &lt;/li&gt;    &lt;li&gt;A newer version of a file has been checked in since the change was shelved. The file will be unshelved, and the status of the file will be Needs Merge. &lt;/li&gt;    &lt;li&gt;There is an edited file in the working folder at the location. You will be prompted with the same prompt dialog used in the get latest process. You may Diff the files, Attempt Automatic merge, Do Nothing, or Overwrite the files. &lt;/li&gt;    &lt;li&gt;The file no longer has the same name as it did when it was shelved. In this case, the unshelve process will unshelve the change into a file with the new name. &lt;/li&gt;    &lt;li&gt;The file is no longer in the same location that it was when it was shelved. If its new location can be determined, then it will be unshelved to the new location. If the new location cannot be determined, you will be prompted for a location to put the file as a non-working folder unshelve. You will not be able to directly check in the file from the non-working folder. &lt;/li&gt; &lt;/ol&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 28 Jul 2008 14:48:14 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a536d6d5-27ff-4a59-a669-e3df52f6ee0b</guid>
      <author>Jeremy</author>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve</link>
    </item>
    <item>
      <title>"Shelve" by Jeremy</title>
      <description>We've figured out how we are going to do compare against baseline and compare against latest for shelvesets.  In both cases, we will download the latest or baseline version of each file in the shelve to a temp directory and each file from the shelveset to a different directory.  Then, we'll do a folder diff between the two temp folders.

As for shelveset names, there can be only one shelveset with a given name for a user inside a repository.  That name can be reused for other users or other repositories.</description>
      <pubDate>Fri, 22 Aug 2008 08:52:19 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c03bc336-11e9-462f-8ba2-bc2e9414a4b7</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-77</link>
    </item>
    <item>
      <title>"Shelve" by Rob Goodridge</title>
      <description>I would agree that comparing the whole Shelveset to the previous version in the repository is very important, given that one reason for shelving is to code review the changes from the previous version. May also be useful to compare to any Branch.

I was also wondering if the Shelveset names were unique to a user or to the whole repository?</description>
      <pubDate>Wed, 06 Aug 2008 20:11:16 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:59ba182a-932b-42f7-9c63-5703802402da</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-76</link>
    </item>
    <item>
      <title>"Shelve" by Jeremy</title>
      <description>Bradley,

The diff context menu will bring the full diff dialog, so it will be able to diff against baseline, latest or any file on the disk or in the repository.

Greg,

You're right.  SGDM can hide orphaned files.  I don't think it will be hard to add this capability.</description>
      <pubDate>Mon, 04 Aug 2008 13:57:42 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9be4d1d2-bcec-4449-873a-da6c627b7d98</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-75</link>
    </item>
    <item>
      <title>"Shelve" by Bradley Uffner</title>
      <description>I see the context menu now in the screenshot.  Does that compare against the current checked in file in vault, or the file as it is in the working folder?


This is a great feature that is going to get a LOT of use from my team.
</description>
      <pubDate>Wed, 30 Jul 2008 23:12:36 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:85e51b89-136f-4d7c-9e54-65f3c80c951c</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-74</link>
    </item>
    <item>
      <title>"Shelve" by GregM</title>
      <description>If shelvesets are sparse, and you can compare one sparse shelveset to another sparse shelveset, then it makes sense to be able to compare a sparse selveset to a working folder.  I'm not sure about SGDM, but BeyondCompare, which we use, can be set to not display orphan files, so it would only display files that are in both places and different.
</description>
      <pubDate>Tue, 29 Jul 2008 11:42:49 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7b8a0452-a739-4f79-aed5-1c9c3f178020</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-73</link>
    </item>
    <item>
      <title>"Shelve" by Jeremy</title>
      <description>Differences versus trunk is accomplished one file at a time through the context menu in the Shelveset Details dialog.  The reasoning for this is that a shelveset is sparse (it only contains the files that are changed), so a folder-compare style diff against trunk would show lots of "this is in the trunk but not in the shelveset" differences.  

The other benefit to doing it in the Shelveset Details is that we can bring up the full "Show Differences" dialog, which will let you choose between diffing against the baseline, or the latest version, or a version in another branch.</description>
      <pubDate>Tue, 29 Jul 2008 08:16:39 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7d60859b-c001-4be7-b2c6-402661163fec</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-72</link>
    </item>
    <item>
      <title>"Shelve" by Bradley Uffner</title>
      <description>I see a way to diff a shelf set to another shelf set, but what about a way to compare it to the trunk as it stands now?  Can this only be done by downloading the shelf set and doing the diff, or is there a way to view that from the shelf interface?</description>
      <pubDate>Mon, 28 Jul 2008 21:18:44 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d8a3c743-c181-4a33-b340-09c52aea6759</guid>
      <link>http://vaultblog.sourcegear.com/articles/2008/07/28/shelve#comment-71</link>
    </item>
  </channel>
</rss>
