Welcome to MSDN Blogs Sign in | Join | Help

Why doesn't Team Foundation get the latest version of a file on checkout?

I've seen this question come up a few times.  Doug Neumann, our PM, wrote a nice explanation in the Team Foundation forum (http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=70231).

It turns out that this is by design, so let me explain the reasoning behind it.  When you perform a get operation to populate your workspace with a set of files, you are setting yourself up with a consistent snapshot from source control.  Typically, the configuration of source on your system represents a point in time snapshot of files from the repository that are known to work together, and therefore is buildable and testable.

As a developer working in a workspace, you are isolated from the changes being made by other developers.  You control when you want to accept changes from other developers by performing a get operation as appropriate.  Ideally when you do this, you'll update the entire configuration of source, and not just one or two files.  Why?  Because changes in one file typically depend on corresponding changes to other files, and you need to ensure that you've still got a consistent snapshot of source that is buildable and testable.

This is why the checkout operation doesn't perform a get latest on the files being checked out.  Updating that one file being checked out would violate the consistent snapshot philosophy and could result in a configuration of source that isn't buildable and testable.  As an alternative, Team Foundation forces users to perform the get latest operation at some point before they checkin their changes.  That's why if you attempt to checkin your changes, and you don't have the latest copy, you'll be prompted with the resolve conflicts dialog.

Published Saturday, August 20, 2005 11:15 PM by buckh

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

This is another reason why TF should probably break from tradition and refer to this operation as "edit" or "Make editable". The term checkout carries baggage with it that is going to confuse people until they form the correct mental model for TF. Same goes for checkin, which IMO should be called "commit". Why? Because you wouldn't think that "checkin" applies to directories you've added, files you have renamed or branches you have created. The term "commit" OTOH fits better and helps convey a more accurate mental model. It's not too late to give up obsolete terminology and pick terms that accurately reflect TF reality. :-)
Sunday, August 21, 2005 2:04 AM by Keith Hill

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

From the command line, you actually have that choice. Edit and checkout are command aliases, and so are submit and checkin. In both the GUI and the command line, the status will show "edit" for a checked out file. The GUI uses only the traditional VS/VSS terminology for the actions, though.
Sunday, August 21, 2005 7:31 PM by buckh

# ... And a Team System Link Round-Up


Microsoft Solutions Framework Fun
Visual Studio 2005 Team System Note on IT
MSF for CMMI Process...
Monday, August 22, 2005 10:10 AM by Life, Universe and Everything according to Dirk

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

I knew about the edit command line alias which I do like. I didn't know about the "submit" alias though. Is there a compelling reason not to just call it "commit" instead of "submit"? Of course, either one is still better than checkin IMO. :-)
Monday, August 22, 2005 11:29 AM by Keith Hill

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

There's no compelling reason. Lots of people have had various opinions about it, though.
Monday, August 22, 2005 2:17 PM by buckh

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

Yeah it just seems that the term "commit" has a well known meaning that is more inline with what happens when you checkin files in TF. "Submit" also has meaning but is more geared toward "submitting a job" which I think is not quite accurate for TF. I kind of wish the VS UI would switch between between edit/checkout and commit/checkin depending on how you set up the exclusive lock mode. If you choose to work more like CVS/Subversion then edit/commit would appear on the menus/toolbars. If you choose exclusive (checkout) locks then stick with checkout/checkin. Just a thought. Sorry to be so nit-picky. The whole of TF is awesome from my experience so far. I would just like to see you get it as close to perfect as possible. I want to have the best shot of justifying a migration off our "other" SCM system. :-)
Monday, August 22, 2005 3:50 PM by Keith Hill

# VSTS Links - 8/22/2005

Launch Tour 2005 Knowledge Center

The launch site for VS2005 and SQL Server 2005

Thom Robbins -...
Monday, August 22, 2005 11:13 PM by Team System News

# Good info on SCC behavior in TFS

Buck Hodges answers (via Doug Neumann) the question: Why doesn't Team Foundation Server get the latest...
Tuesday, August 23, 2005 11:32 AM by .net <i>DE</i>lirium

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

Resolve/Merge is often more complex than a get operation. Wouldn't it make sense to either prompt the user if they want to get latest, or at least provide some visual indication that the current file you have just "made editable" differs from the latest version in source control? On a .NET 2.0/TFS project i'm working on currently we are constantly running into issues due to the fact that the "get latest" operation is not performed and no notification that the file has changed is made available.

I have no problem with the choice to use the current file over a get latest as it does make sense from a consistency perspective however I think some type of "bubble tip", status bar notification, or output window message would serve to make this easier to see and track.
Tuesday, August 23, 2005 12:45 PM by Ron Buckton

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

Ron, I agree that notification that you don't have the latest when you pend an edit is helpful, and we actually produce that info. I don't think it was communicated in VS in beta 2 (you'd get the messages using h.exe, but VS wouldn't necessarily process them). In the July CTP and the upcoming beta 3, you'll get those messages in the Output window in VS.
Tuesday, August 23, 2005 9:12 PM by buckh

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

"if you attempt to checkin your changes, and you don't have the latest copy" - how is this determination made exactly?
Monday, September 05, 2005 9:50 AM by Rob

# VSTS Complaints

So this morning I starting editing a file for a project using VS 2005 with Visual Studio Team System.&amp;nbsp;...
Sunday, March 05, 2006 11:59 AM by 10,000 Monkeys - Harnessing The Power of Typing Monkeys

# Team Foundation Server: On Checkout, TFS Does NOT Perform a Get Latest (By Design)

Wednesday, March 22, 2006 3:44 PM by RobLog

# TFS e il non Get Latest Version su Checkout

Friday, June 16, 2006 12:11 PM by Dottor's BLogs

# il silenzio di un urlo &raquo; Blog Archive &raquo; TFS e il non Get Latest Version su Checkout

# Team Foundation Source Control Tips

Barry Gervin recently wrote some nice tips for working with source control and Team System on a mailing...
Wednesday, July 05, 2006 4:34 PM by Steven Smith

# Getting Latest on Check Out - VSS versus TFS

If the battleground for VSS vs. TFS will be fought anywhere it will be on this issue.&amp;nbsp; As with any...
Wednesday, August 09, 2006 10:34 AM by Technical Weblog of Eric Charran

# TFS Version Control Concepts 0: Vocabulary

To summarize the goals laid out in my reintroduction , I want a chance to start my TFVC "story" from

Tuesday, October 24, 2006 3:39 PM by BUGBUG: poor title

# Another solution to "Get Latest on Checkout"

As most SourceSafe users have probably discovered by now, TFS does not get the latest version of a file

Wednesday, November 29, 2006 9:45 AM by BUGBUG: poor title

# TFS(Team Foundation Server)使用经验

使用TFS有一段时间了,有很多功能,例如源代码管理相关的,很以前的使用VSS和ClearCase等都不太一样。经过摸索,积累的一些经验,和大家分享一下吧! 1、TFS不仅仅提供了源代码管理的功能,还提供了任务管理、分析服务等许多功能,但这些功能必须全部安装,不能够定制安装,例如只安装其中的源代码管理工具:(

Sunday, January 14, 2007 8:27 AM by cnblogs.com

# Resources for Today's TFS Live Meeting

TEAM FOUNDATION SERVER Team System Overview http://msdn2.microsoft.com/en-gb/teamsystem/aa718836.aspx

Wednesday, February 28, 2007 3:39 AM by Microsoft UK Developer Tools Team

# 转 :TFS(Team Foundation Server)使用经验

使用TFS有一段时间了,有很多功能,例如源代码管理相关的,很以前的使用VSS和ClearCase等都不太一样。经过摸索,积累的一些经验,和大家分享一下吧!

1、TFS不仅仅提供了源代码管理的功能,还...

Tuesday, March 13, 2007 2:23 AM by qy1141

# TFS GetLatest version on check-out Add-In

Hi everybody, And again about the famous issue of the TFS version control – Get latest version on check-out.

Sunday, March 25, 2007 8:47 AM by SRLTeam

# Get Latest on Checkout - now and in the future

One of the issues I have heard most often when I am introducing TFS Version Control to a development

Sunday, March 25, 2007 7:04 PM by My VSTS Blog

# Get latest version on checkout with team system source control

The TFS team over at Sela , spearheaded by Tal Gur Arie, had developed a little addin that solves the

Tuesday, June 19, 2007 3:50 PM by ISerializable - Roy Osherove's Blog

# Get latest version durante il CheckOut con TFS

Wednesday, June 20, 2007 4:05 AM by Normal people bores me!

# TFS Get latest version on checkout

As most Team Foundation Server (TFS) users will know by now, upon checkout of a file from source control

Wednesday, June 20, 2007 6:10 AM by Dennis' Blog

# TFS(Team Foundation Server)使用经验(转)

TFS(TeamFoundationServer)使用经验

Friday, February 22, 2008 10:10 PM by LongSky

# 转: TFS(Team Foundation Server)使用经验

Tuesday, March 11, 2008 11:08 PM by lllxy

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

Though this is a beaten-to-death topic, I feel the urge to vent some bottled-up frustration! I do see the merits of the "consistent code snapshot" philosophy but, having gone through the pain of resolving a whole flock of avoidable conflicts in my team due to "stale edits" on first moving from VSS to TFS, I consider the lack of notification and the total omission of the "get latest on check out" option a near-criminal miss by the TFS Dev team. Why does it have to be "my way or the highway"?! After all, it was Microsoft's home-grown VSS that inculcated these "bad" habits to begin with! Now Microsoft may well have the luxury of putting all their new developers through a comprehensive TFS training program before their projects begin but the least I would expect in a VSS successor is a dialog box the first time around with the option to control default behavior! Oh well, at least 2008 brings some relief...

Tuesday, August 19, 2008 9:53 PM by Mayur N.

# re: Why doesn't Team Foundation get the latest version of a file on checkout?

Mayur, you'll be happy to know that we've added an option in TFS 2008 to get the latest on checkout.

Buck

Wednesday, August 20, 2008 9:45 PM by buckh

# Why "Get Latest" sometimes doesn't...

I've seen quite a bit of angst from new TFS users over the &quot;Get Latest Version&quot; behavior in

Thursday, August 28, 2008 9:21 AM by Jason Barile - Microsoft in Raleigh, NC

# TFS 2008 – Get Latest Version when Check Out

As TFS users probably know TFS 2005 (unlike SourceSafe and other Source Control tools) didn’t perform

Monday, May 04, 2009 4:08 PM by Baruch Frei

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker