Sunday, June 27, 2010

Short Post - Using non-Visual Studio editors with TFS

I haven't posted for a while, but that is because I have a job. Slightly more specifically, I'm employed at a place that uses Microsoft's Team Foundation Server for source control. TFS plays well with Visual Studio. The moment when someone starts editing a file in VS, TFS will automatically check out the file. This is good if you only use VS to edit files, but things start going pear-shaped when you start using a different editor (such as Notepad, Vim, or Emacs).

At best, the file will be marked as read-only in the non-VS editor, preventing one from initiating changes from those editors. At worse, Visual Studio's TFS integration will not detect changes made outside of VS, and it will happily assume that the file is unchanged for the purposes of reverting any changes. This behavior might have changed for Visual Studio 2010, but I assume that most places are still using 2008 or below.

Anyways, here's a simple tip:

Check out the file before editing it elsewhere.

This allows write access to the file AND enables VS's TFS integration to see any changes that you make.

Hope that saves a little bit of heartache.

No comments:

Post a Comment