English 中文(简体)
Forbidden Patterns Check-In Policy in TFS 2010
原标题:

I ve been trying to use the Forbidden Patterns part of the TFS 2010 Power Tools and I m just not understanding something - I simply cannot get anything to change as I try to use this! I m using the version that was released recently (I believe April 23, 2010), so it s not an old version.

First off, yes, I know it s regex based, so let s clear that doubt...

I have tried to block the following scenarios:

1) I have modified all of my T4 EF templates to generate files named EntityName.gen.cs. I then attempted to prevent TFS from wanting to check those files in. I used the regular expression .gen.csz and it didn t change a single thing! I even tried it without the z and nadda!

2) I don t want app.config and web.config files to be checked-in by default because we have these things stored into app.config.base and web.config.base files that our build scripts use to generate our per-environment app.config and web.config files. As such, I tried the following regexes and again, nothing worked! web.configz, app.configz, web.release.configz and web.debug.configz.

What is it that I am screwing up with this?

问题回答

Here s a set of expressions we use that work. We have the December 2011 Team Foundation Power Tools installed, which is where the Forbidden Patterns Policy feature comes from, not from a base TFS 2010 install.

.*/[Bb]in/.*

.*/[Pp]ackages/.*

.*/[Oo]bj/.*

.*/_[Rr]eshar[Pp]er./.*

.((?i)suo$)

.((?i)user$)

thumbs.db

I also found another site that has a good write-up with example patterns.

After playing around for a while I found a working solution for excluding *.config files (derived from the following blog link text)

^(.+.config$)

Please don t ask me why it s the way it is, I don t really get it myself, especially the part with $) ( )$ does not work!)





相关问题
Why not use TFS as a build / CI solution?

Currently our build solution is set up using TFS + MS Build scripts. TFS is also being used as a CI server. I ve seen several posts on this site telling people about other CI solutions. Are there ...

Get files from TFS under Linux [closed]

is there a free (command line) tool for linux which with I can get all files from a TFS-Repository (no Check in / Check out required - only get actual version)?

upgrading tfs 2008 sp1 to use sql server 2008

I have an instance of tfs 2008 supported by sql server 2005. I want to change the sql server machine by doing a restore based move. I also want to change the version of sql server to 2008. I know ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

TFSReg in 2010 Beta 2?

does anybody know what is the equivalent of the TFSReg.exe command-line tool in 2010 Beta 2? I cannot find it anywhere, I searched the entire Program Files tree. Was it renamed? Moved? Replaced by ...

热门标签