syvex
syvex

Reputation: 7766

TFS source control case sensitivity

TFS has a funny habit of mixing up case in folders. For example, some developers might check in $/FooBar/readme.txt while others may check in $/Foobar/readme.txt.

Is there anyway to force TFS to treat files/folders as case-sensitive?

For example, if a folder $/FooBar/ already exists, when someone adds $/foobar/readme2.txt, the folder casing would be updated to be $/FooBar/readme2.txt since that already exists.

For the most part users won't notice this, but internally in the TFS database, this can cause confusion in other tools (like git-tfs).

Upvotes: 7

Views: 2825

Answers (2)

jessehouwing
jessehouwing

Reputation: 115037

There is a check-in policy that ships with the Team Foundation Server Power tools, which will allow you to specify regex patterns to allow or disallow. You might be able to cobble something together with that.

You can find the check-in policy on the Visual Studio Power tools site.

A tutorial on how to specify patterns for this tool can be found here.

Further more, TFS does treat files and directories as case sensitive in TFS 11 and forward, Martin Woodward demonstrated this in his presentation on the ALM Summit last November, but as in Windows it doesn't matter, it won't complain if you're on a windows host. If you're using Team Foundation Everywhere, you'll see that on a linux filesystem case sensitivity is preserved. It's a platform thing..

Upvotes: 3

KMoraz
KMoraz

Reputation: 14164

Unfortunately once a folder has been checked-in its case remains persistent in TFS.

The workaround is to rename:

tf rename $Project//FooBar $/Project/foobar/

Source: http://kb.teamprise.com/article/view/52

Upvotes: 6

Related Questions