Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFPT Unshelve migrate not working

I know this has been asked before, but as there were no answers, I'm asking again.

I'm trying to migrate a shelveset from one branch to another. I'm running the following command, from within the workspace DIR:

tfpt unshelve changes;myusername /migrate /source:$/main /target:$/new-branch

when i run that command I get the 'shelveset details' window up, with the changes, and the folder (pointing to $/Main)

Clicking unshelve gives me the conflicts dialog box, again with folder pointing to $/main. If I click resolve, i get the following options:

  • Keep my local changes Undo my local changes, and take the shelved
  • Undo my local changes, and take the shelved changes.
  • Keep my local changes, and merge the local and shelved contents

which ever option I pick, I never get any pending changes in 'new-branch'. The only changes I have pending are for the main branch.

any ideas?

like image 688
Jay Avatar asked Sep 25 '12 15:09

Jay


People also ask

What does unshelve mean in TFS?

Unshelving is how you restore the shelveset to your machine so you can keep working on it. It doesn't change the shelveset on the server (to do that you need to shelve things again and use the same shelveset name).

How do you Unshelve a Shelveset in Visual Studio?

To unshelve the shelveset from someone else you go to Team Explorer -> Pending Changes. You then select the Action link next to Shelve and select Find Shelvesets. By default, you'll now see the shelvesets that are found for your user account.

What is Visual Studio Unshelve 2019?

The unshelve command of the tf command-line utility retrieves either all shelved file revisions or a defined subset of all shelved file revisions from the Team Foundation server into the current workspace. To unshelve an item, there must be no pending revisions against it in the destination workspace.


1 Answers

You need to run this command from a directory that is mapped to your target branch ($/new-branch, in your example).

For example if your current branch is => Main which is mapped in your workspace at C:\Workspace\TeamProject\Main\...

And you want to move the changes to Dev which is mapped at D:\Workspace\TeamProject\Dev

Then you need to run the following command, from the following directory:

C:\Workspace\TeamProject\Main> tfpt unshelve "changes;muusername" /migrate /source:$/TeamProject/Main /target:$/TeamProject/Dev

See Tarun's blog post for more details: http://geekswithblogs.net/TarunArora/archive/2011/06/06/unshelve-shelveset-created-from-one-branch-to-another.aspx

like image 64
Grant Holliday Avatar answered Sep 28 '22 10:09

Grant Holliday