0
votes

My team is moving to TFS and we are currently testing migration from VSS. The VSS Converter requires all TFS projects to be created prior to conversion. We have upwards of 30 projects and it is time consuming to create these.

Is there any way to refresh the source control portion of our projects between tests (returning them to their original blank state) while leaving the projects intact, thereby allowing us to run multiple conversion tests without having to recreate our project collection and projects every time?

[Edit]

To answer John's question below: When creating a Team Project TFS, by default, creates an empty source control folder by the same name and associates it with that Team Project. The conversion file requires that source control folder to be available.

2
Does it require the "projects" to be created, or the "Team Projects"? These are two independent concepts in TFS. - John Saunders
What happens if you create one team project and multiple subfolders? - John Saunders
We haven't tried it because it doesn't reflect our real-world structure. As part of our testing we are looking at moving multiple (logically grouped) vss projects under a single TFS project and that works just fine. However, we want our PMs and devs to be able to test work items linked specifically to the correct source control folders, etc. - Jason Irwin
there my suggestion wouldn't prevent that. There's really not necessarily a one to one relationship between Team Projects and source control folders. I'm suggestion you create one Team Project for the migration, create the multiple source control folders in your preferred pattern, do the migration, then create additional Team Projects as required. - John Saunders

2 Answers

1
votes

I'm going to make some assumptions.

  1. you're using TFS 2008 or 2010
  2. you're not afraid of the command line :-)

I think in this scenario the "tf destroy" command is going to be your friend.

e.g. "tf destroy $/TeamProject1/FolderToBeWiped"

You could easily write a script that wipes all of your existing folders in source control. As a word of caution, DO NOT do "tf destroy $/" as this will take out the Source Control part of the team project(s) and you'll need to create it (them) again.

0
votes

As a follow-up, I finally found a way to automatically create the requisite projects. Essentially the process is to drop and recreate the collection, then generate the projects from your xml mapping file. If anyone is interested I blogged it here

http://irwinj.blogspot.com/2011/05/tfsautomated-project-creation.html