While in TFS/VS 2005 there was no option to get latest on check out, in 2008 version there is not one but two different ways to configure that feature (Disclaimer: I am not endorsing getting latest on check out but just trying to reach sort of closure of TFS/VS 2008 featureset).
First option is to enable this setting per workstation, using Visual Studio TFS source control provider settings (available through “Tools->Options” menu):
This option is fully controlled by the user in his environment, and does not affect other users in any way.
Second option is to configure “Get Latest On Check-Out” per Team Project (using “Team->Team Project Settings->Source Control” menu):
Since the option is set for the Team Project, it can be enabled by the administrator and will affect all users working with the project files.
Thus in VS 2008 one has a choice of having “Get Latest On Check-out” option enabled either for all developers working at the project (using Team Project settings) or a developer can enable that option for himself (by using VS Source Control provider settings).
From the “best practices” standpoint, I’d like to note once again that getting latest on check-out is very disruptive, evil and outdated practice. While I am highlighting those features, I am neither a fan or a user of those.
Consider the following typical scenario – you have checked out file in VS project. Since get latest is performed, you just got yourself the latest version of that file. If that latest version contains changes that are incompatible with the other files’ versions in your workspace (say, dependencies on new interfaces that are not yet in your workspace), then you are screwed. That is, to make things tick now you will have to get latest versions of all relevant files in your workspace (hello and welcome back, VSS!).
And besides, Team Project setting somewhat smells of dictatorship, since it will force everyone on team to conform to VSS-like mode of operation. Not a good thing in today’s flexible world.
Related posts:
- Get latest on check-out in TFS 2008
- (Not) getting latest on check out – a bug?
3 comments:
Hi Eugene
I thought the project setting just enabled for users to get latest on checkout, not forced the setting for all users. So if you wanted a single user to have this ability you would enable it at the project level and enable it at the IDE level. If you didn't enable it at the IDE level though, it wouldn't get latest on checkout even if the project level setting was enabled.
Ed,
Nope, Team Project setting is not connected to VS IDE setting. If you have setting on Team Project level, you will have it no matter IDE setting.
At least that's the way it worked for me.
So the TFS UI label is very misleading, it does not "enable" the get latest on check out, it forces get latest.
This label should be changed so that it correctly conveys its purpose.
I keep asking myself why the UI parts of TFS are so inferior to the underlying system. On of my favorites is when TFS (in VS) tells you that you have the latest version of a file when you don't even have a copy on disk :P
Post a Comment