Delete (orphaned) branch relation using Visual Studio .NET / TFS 2010

MK .NET UG

MK .NET UG
Macedonian .NET User Group

Application Lifecycle Management

Improve software manageability

Delete (orphaned) branch relation using Visual Studio .NET / TFS 2010

  • Comments 10

I have wrote yesterday about deleting orphaned branch directly from DB. But thanks to Martin Kulov and Buck Hodges the solution of this problem can be performed using Visual Studio .NET 2010.

Here is the problem:

According to the Basic Branching Plan (http://tfsbranchingguideiii.codeplex.com/) sometimes you need to delete a branch.

But what happens.. in Branch Hierarchy View a branch still exists and makes a confusion to you and your colleagues.

In the next image is situation when you have made branch from DEV to MAIN instead the opposite way. Well the steps I’ve performed was:

  1. Create Dev Branch
  2. Create Branch From DEV to MAIN
  3. OOOOOOOPS… making a mistake !!!!!
  4. rename DEV branch to DEV_2
  5. making new branches from MAIN (DEV and PRODUCTION)
  6. Delete DEV_2 branch.

But the situation was as is shown here (DEV_2 branch still exists):

 

image

Here is the solution:

  1. Go to Tools > Options > Source Control > Visual Studio Team Foundation Server > Show deleted items in the Source Control Explorer
  2. Refresh items in Source Control Explorer, You will see the deleted branch DEV_2
  3. Right Click on deleted branch and make Undelete, that returns your branch from deleted items
  4. And finally the hint: select the branch and go to: File > Source Control > Branching and merging > CONVERT TO FOLDER (why it does not exist in context menu of branch I don’t know ?!?!)

image

5. Make Check In, and the relation to orphaned branch is disappeared. After that you can delete whole folder if you want etc…etc..

See you real soon !!

Latek

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Thanks Latek,

    This really helped us solving our problem :)

  • Step #4: Best comment and step I've found in a while!

  • Thank you. Solved our -CURRENT- Tfs problems.

  • Thanks for this, never even knew deleted branches weren't actually deleted! :)

  • Wow.. saved an hour for me.. worked perfectly. thanks

  • Thanks!

  • Thanks!

    You made my day.

  • This didn't work for me! I followed the steps but still see deleted folders in source control.

    Could this be due to permissions?

  • Thank you a lot! F.. MS usability.

    "File > Source Control > Branching and merging > CONVERT TO FOLDER"

  • Thanks Latek!!!

    I read  your post..It is really knowledgeable.I appreciate your work.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment