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

流过昼夜 提交于 2019-12-01 16:09:36

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/6572535/how-and-where-does-tfs-2008-tfs-2010-store-changesets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!