locked
TFPT unshelve : "An item with the same key has already been added"

    Question

  • I'm trying to unshelve across branches, and when I do so, I am getting the error message in my title.

    My command line looks similar to this:

    TFPT.exe unshelve ShelveSetName /migrate /nobackup /source:$/Suite/Product/trunk /target:$/Suite/Product/branches/V13Release

    and I am unsure what this is telling me or how to proceed further to find more information.  Can someone point me in the right direction? Is there any standard operating procedure for debugging this issue?

    Wednesday, August 17, 2011 6:12 PM

Answers

  • Alan,

    I'll explain this with an example. Lets say my shelve name is "MySampleShelveName" and i need to migrate from branch "$/MyTeamProject/TheOrigionalBranch" to "TheDestinationBranch".

    /> tfpt unshelve “MySampleShelveName” /migrate /source:”$/MyTeamProject/TheOrigionalBranch” /target:”TheDestinationBranch”

    Catches

    1. If you get the error => "unable to determine the workspace"

    2. Undo all pending changes on your branch and Get the latest from your source control and “cd” to a local path that is mapped to the target workspace.

    3. Ensure that the current working directory is mapped, you can run "tf workspace" and see if the target folders are mapped.

    4. When you run this command, you need to run this from the branch where you have the shelve set.

    PS - Check out the blog post here => http://geekswithblogs.net/TarunArora/archive/2011/06/06/unshelve-shelveset-created-from-one-branch-to-another.aspx

    HTH
    Cheers, Tarun


    Please remember to mark the replies as answers if they help.

    Tarun Arora

     

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader


    Wednesday, August 17, 2011 9:38 PM