Monday, September 28, 2009

Multiple Check-outs on TFS

Team Foundation Server Source Code Control comes with default options that can cause some problems to developers coming from Visual SourceSafe.
  1. Multiple check-outs of the same file are allowed by default. When you try to check in code that has been modified by another developer, a merge conflicts screen appears for you to select what you want to keep and what you want to discard, from yours modifications and from other's too. That can be quite a pain if the file has been through many modifications.

  2. Receiving the latest version of a file on check-out is *not* a default setting. So, even if you disable multiple check-outs, you may still find yourself at the merge conflicts screen, because you worked on code that doesn't have the most recent modifications made to it.
If you like single check-out and think modifications merging is a bad ideia, you have to change the default TFS SCC options. Open the project on Team Explorer, double click Source Code and, on the Team menu, select Team Project Settings > Source Control. Then, reverse selections:



That way there will be no two developers working on the same code at the same time, and you will always be editing the latest version of any code you check out.

No comments:

Post a Comment