Sunday, August 15, 2010

Simulating the SVN Externals feature in TFS

In a previous post, I talked about some differences between SVN and TFS. One of the missing features of TFS are Externals.

First, what are externals? From the SVN documentation:

Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. Subversion provides support for this through externals definitions. An externals definition is a mapping of a local directory to the URL—and possibly a particular revision—of a versioned resource.

If you read it well, you can compare it with the sharing feature of SourceSafe on steroids. But all the people who used Visual SourceSafe and the sharing feature probably remember that it came with a great deal of pain. That’s also the reason why the TFS decided to completely remove this kind of feature in favour of branching. But if you really want this functionality, you can simulate it. Not on the source control level, but on the solution level. By using the project linker synchronization tool, you can link to external resources in your projects.

1 comment:

Zapp said...

Can you elaborate on how to use the Project Linker to simulate SVN:externals? My problem is that I want to share a project as a library between two other projects. I want to be able to change the library for one of these projects without those changes automatically propagating to the other project. In other words, I was hoping to link against a particular revision of the library so that any changes in later revisions are not automatically picked up. Is this possible?