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:
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?
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).
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With