Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How and where does TFS 2008 / TFS 2010 store changesets?

Tags:

tfs

changeset

I am attempting to understand how TFS 2008 (and 2010 if it's different) store and communicate details of a set of changes in a changeset.

Now when I commit to a Subversion hosted project, the client sends diffs to the server. So if I have added a file and changed a few lines in another it sends something like "Added file A.txt, put 2 lines "A" "B" into B.txt" . This means I can back out a revision as diffs are nicely reversible - "Delete file A.txt and take out two lines from B.txt". Pretty sure it is the same with git too.

I have a feeling that TFS does not store changesets in this way (based on rumour and the fact that I cannot easily roll back revisions etc.).

What I believe occurs is this: If I changed files A, B and C within a changeset, what is actually stored in the changeset is a whole new copy of files A, B, C. Not just the diffs.

Am I correct in this assumption? As commercial software, I could well believe this information is not available but I thought I would ask as googling produced nothing!

As a corollary: Where are TFS changesets stored? I know that SQL server is used for some storage... changsets too?

We are currently using TFS 2008 but it would also be useful to know the answer for 2010 as I think there are plans to upgrade.

like image 762
Jennifer Avatar asked Jul 04 '11 14:07

Jennifer


People also ask

How does TFS store files?

TFS stores the source and changesets in a SQL database while VSS stores the source on the file system. Just for your information: stackoverflow.com/questions/6572535/…

How do I apply changesets in TFS?

In Source Control Explorer, hit keyboard key Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK.


1 Answers

TFS stores all changeset data in a SQL Server database. It stores the code from the most recent changeset in its entirety. It then stores a diff to the previous version. One of the benefits of storing it all in SQL Server is that it gains the "all or none" saving capability that is provided by transactions.

As for WHERE it's stored, you can check out this blog entry http://blogs.msdn.com/b/bharry/archive/2009/04/19/team-foundation-server-2010-key-concepts.aspx

like image 167
Doug Ferguson Avatar answered Sep 19 '22 12:09

Doug Ferguson