Unshelve shelveset created from one branch to another
When you need to unshelve to a different branch. TFS power tool will help…
The power tool command /> tfpt.exe unshelve can
be handy for the following,
·
Allows a shelveset to be unshelved into a workspace with pending changes.
·
Merges content between local and shelved changes.
·
Allows migration of shelved changes from one branch into another by
rewriting server paths.
·
Allows changes from an already-unshelved shelveset to be undone, cleaning
up pending adds, and preserving other existing pending changes in the
workspace.
Download and install the latest TFS Power tools http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f
Below is a list of features that are installed with the March 2011 Power
tool installation.
Once the installation is complete, go to the cmd and type />tfpt.exe
we are interested in />tfpt unshelve to achieve
unshelving of a shelve set to a different branch
Syntax
/>tfpt unshelve [shelvesetname[;username]] [/nobackup]
[/migrate /source:serverpath /target:serverpath]
[/migrate /source:serverpath /target:serverpath]
shelvesetname The
name of the shelveset to unshelve
/nobackup Skip the creation of a backup shelveset
/migrate Rewrite the server paths of the shelved items
(for example to unshelve into another branch)
/source:serverpath Source location for path rewrite (supply with /migrate)
/target:serverpath Target location for path rewrite (supply with /migrate)
/undo Undo pending changes from an unshelved shelveset
/batchsize:num Set the batch size for server calls (default 500)
/nobackup Skip the creation of a backup shelveset
/migrate Rewrite the server paths of the shelved items
(for example to unshelve into another branch)
/source:serverpath Source location for path rewrite (supply with /migrate)
/target:serverpath Target location for path rewrite (supply with /migrate)
/undo Undo pending changes from an unshelved shelveset
/batchsize:num Set the batch size for server calls (default 500)
Sample
/> tfpt unshelve “MySampleShelveNamel;AD\username” /migrate
/source:”$/MyTeamProject/TheOrigionalBranch” /target:”TheDestinationBranch”
Catches
If you get the error => "unable to determine the workspace"
NOTE: Take the latest from your source control and “cd” to a local path that is
mapped to the target workspace. Also ensure that the current
working directory is mapped, you can run "tf workspace" and see if
the target folders are mapped.
No comments:
Post a Comment