views:

47

answers:

2

I have been using SourceGear vault for some personal projects and Team Foundation Server for work projects. One thing TFS is missing is a simple feature that Vault has on its check in dialog window.

In the Vault client, you can see if the checked out file changed from the previous version checked in. Here is a screen shot. Notice the column "Details"? That tells you there is a difference. The way this is super helpful is if you have to check out a entire project because you are going to do code re-generation. I'll check out my class library project and then regenerate my CodeSmith templates. Doing this may result in just a few specific files from changing. When I view the pending check-in screen, I see the files that really changed and I can compare to see the impact.

SO... can TFS do this? Maybe there is a 3rd-party tool that will do it for me? Is there a TFS SDK or PowerTool that I have to get. Anyone want to build it?

+1  A: 

I work in a corporate development environment where many developers may be working on the same file, and we have TFS as our source control as well. In our document of Best Practices for TFS, we really discourage checking out files that the developers don't intend on changing, that way we naturally exclude files without differences when submitting a changeset.

To answer your question, I normally just look at the "Pending Changes" window and run a Compare on the "changed" files that I'm unsure of--the Compare tool should immediately tell you if your local copy is the same as the server copy. Unfortunately, there's no real workaround other than what I suggested, but I don't see the scenario where I absolutely must check out an entire project branch for editing.

danyim
Do you use code generation?
MADCookie
I'm not sure what you mean by code generation. But on the other hand, I can say that's usually what we developers try to do from 8 to 5 :)
danyim
Code generation using tools like CodeSmith to generate business object classes based on the schema of a database. If you are not doing this kind of development, then you wouldn't need to check out all the files in a project.It looks like Grant Crofton understands the need.
MADCookie
A: 

I don't like answering my own questions, but it looks like there might not be a real Microsoft solution out there. For me, this is how I handle the problem at the office using Visual Studio.

  1. Before I re-generate the business objects, I make a copy of the entire folder structure
  2. I check out the entire project or the root generated folder
  3. I start the code generator. Sometimes, I know exactly what is changing, but other times, I might make a lot of changes and I don't want to miss anything. My code generator at work also generates all the SQL files needed to DROP / CREATE stored procedures.
  4. Using SourceGear DiffMerge, I compare the folders of the just generated and the previously backed up folder.

This is pretty time consuming. I never thought of it as a problem until I saw Vault identifying that a file was different on disk from the repository.

Maybe you all can say how you do code generation / regeneration when working with a source control repository.

MADCookie