2

My company has changed the Domain , and now my TFS id is also changed, but i want all my old shelvesets to be copied from that username to my new one, for now i have credentials for both the usernames. but want to move/copy shelvesets from one username to another..

please guide is it possible

John Saunders
  • 160,644
  • 26
  • 247
  • 397
N.K
  • 2,220
  • 1
  • 14
  • 44
  • Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on [so]. See "[Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts). – John Saunders Nov 26 '14 at 06:09
  • No but i have more than 300 shelvesets. :( i want some thing better, as i know there is a command for moving shelveset from one branch to another. so there should be something to move shelvesets from one user to another – N.K Nov 26 '14 at 06:10
  • I've never tried it but I think you should be able to use the TFS PowerTools PowerShell commandlets. There is a get-shelveset and new-shelveset command that has move option. However, the documentation is a little thin. – Wouter de Kort Nov 26 '14 at 07:15
  • @Wouter, that won't work, as on Unshelve any potential merge conflicts to Latest must be resolved. And the merge will be reshelved. – jessehouwing Dec 02 '14 at 15:23

1 Answers1

3

You can get the old Shelveset, create a new one with the same name and your new userid and then delete the old shelveset.

Or you can just leave them as is, as you can always unshelve something from another user (even your old user), as long as you know who to look for. Use the Find Shelveset feature and use your old user id.

You could try to do it using the TFS Client Object Model and Powershell. Using the VersionControlClient.UpdateShelveset.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • No but i have more than 300 shelvesets. :( i want some thing better, as i know there is a command for moving shelveset from one branch to another. so there should be something to move shelvesets from one user to another – N.K Nov 26 '14 at 05:53
  • 1
    If the domain move had been done properly, your shelvesets would have moved with the account. Now that they didn't do that, you'll need to reshelve them to make them move. You might be able to script it through the commandline though. Domain moves and TFS are a tricky thing and when not done properly can lead to duplicate accounts (as you're seeing right now). Let me look for alternatives, but I fear there aren't many – jessehouwing Nov 26 '14 at 06:17
  • as we have Shelveset Migration Script for moving shelvesets from one branch to another, there must be a solution for migrating from one user to another.. – N.K Nov 26 '14 at 09:14
  • The solution for moving shelvesets from one user to another is to do the domain move correctly. As you have not you will likely need to do this manually. – MrHinsh - Martin Hinshelwood Nov 28 '14 at 06:28
  • 3
    If you're maintaining 300 shelvesets, it sounds highly likely that you're doing something incorrectly. Shelvesets are meant for short-term suspension of work, not as an alternative to branches. – Daniel Mann Dec 02 '14 at 14:43