4

I'm trying to use tfpt to migrate a shelveset from a source branch into a target branch, but it doesn't appear to do anything...not that I'd expect much more...but any chance anyone knows what's wrong? I'm following the instructions correctly I think...

I've got:

tfpt unshelve "DbMigrations" /migrate /source:$/TeamProject/Main /target:$/TeamProject/Releases/7.20
Jeff
  • 35,755
  • 15
  • 108
  • 220

3 Answers3

4

What happens after you run the command? You need to have a few things set up before migrating:

  • A workspace that encompasses both the source and target branches.
  • You need to run the command in a folder within the source.

Once you run the command you should be asked to merge the changes from the original shelfset into the destination branch and resolve any conflicts, which finally pends a changeset on your client. Nothing is touched on the server until you check that changeset into TFS itself.

Damien Ryan
  • 1,591
  • 1
  • 15
  • 34
  • 1
    To your points - yes, I've done both of those. When the prompt comes up to merge my changes, it shows the Main branch in the folder path, not the Release branch. And if I resolve all my conflicts, I see Pending Changes to the Main branch, not the Release branch. – Jeff Oct 24 '11 at 14:13
  • 4
    Just a quick comment, I had the same thing happening to me (changes unshelved to /source) until I fixed my dumb typos in the /source parameter. The utility wasn't telling it that it couldn't find the specified path, it simply unshelved the shelfset to where it came from. – David Peters Dec 17 '12 at 16:29
  • Same was happening to me. I had a path with spaces and needed to include quotes around the source/target like so: `/target:"$\Has Spaces\Somewhere"`. – Ocelot20 Jan 29 '13 at 21:40
  • Not only was I running the command in the target dir instead of the source dir, I also had a typo in the source dir. Wish there was a less error prone way to do this. – Dr. Hilarius Apr 21 '16 at 16:05
  • @Dr.C.Hilarius: one less error prone method is to copy the path from the Source Control Explorer's Advanced> Properties dialog, as suggested here: http://stackoverflow.com/questions/8055045/tfs-power-tools-migrate-doesnt-actually-migrate#comment42195839_21377221 – Pete Nov 07 '16 at 17:22
1

I experienced the same problem and I could not get it to work by specifying the shelveset name. However, I discovered that if you remove the name of the shelveset altogether, TFS will pop up a window with a selection list of available shelvesets to choose from. Select the desired shelveset and perform all other merge operations as per normal.

Example: c:[mapped workspace target path] > tfpt unshelve /migrate /source:"$/Sourcepath" /target:"$/targetpath"

str8ball
  • 111
  • 1
  • 12
0

You need to use the branch paths on the TFS server, not your local machine. To find the paths, go to source control explorer in visual studio, right click the branch, advanced > properties, and you want the branch name, not the local path. If the path has spaces, wrap it in double quotes.

dom8trix
  • 1
  • 1