views:

543

answers:

2

We're using team foundation server for our source control. I frequently put files into my project (under source control) and forget to "add" them as far as TFS is concerned. There are also cases where TFS doesn't pick up new files (copy and paste a file in your project).

Is there a way I can list all of the files that have not been marked as "add" so that I can verify that all of the intended check-ins take place?

This is driving me crazy! We don't have continuous integration set up yet for this project, and I keep missing files. I don't find out until someone asks me where the file in.

In Subversion, this was dead simple.

I know one solution is to checkout a second copy, but that's not really an optimal workaround.

A: 

Yes there is. Navigate to Source Control Explorer. Click on the project you're interested in. Click the "Add Items to Folder" button. It is two over from the refresh button. This will give you a list of all files that are in the folder but not added to source control.

Ray Booysen
That does work, but it's not recursive. Navigating through the entire folder structure can be very difficult.
Jason Young
probably the next best thing is to write code for this. TFS has a full managed set of code for talking to TFS so you should be trivial to write code to recursively check each folder and TFS for files not added.
Ray Booysen
Using 'tfpt online', as in the accepted answer, is much easier than writing your own code against the TFS API (in case anybody skips over the accepted answer for some reason :p )
phloopy
+3  A: 

You might want to make sure you have the latest version of the TFS client installed (VS 2008 SP1) as that makes it much easier to work with files. Also, take a look at the TFS Power Tools - especially the tfpt online command.

The tfpt command line has a bunch of handy TFS utilities. Once you install the TFS power tools, type "tfpt help" at a Visual Studio 2008 Command Prompt to get a list. If you do "tfpt online /r" in the root of your solution it will detect the files that are writeable in your local file system and pend adds or edits for them. You might want to limit the command so that it only looks for source files - "tfpt online /r *.cs" for example.

Good luck,

Martin.

Martin Woodward
I used 'tfpt online' - it worked perfectly!
AgileJon
Taking solution offline then back online might do similar trick.
hongliang