TFS 2010中的禁止模式检入策略 [英] Forbidden Patterns Check-In Policy in TFS 2010

查看:78
本文介绍了TFS 2010中的禁止模式检入策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用TFS 2010 Power Tools的禁止模式"部分,但我只是不了解某些内容-当我尝试使用此功能时,我根本无法进行任何更改!我使用的是最近发布的版本(我相信是2010年4月23日),所以它不是旧版本.

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...

我试图阻止以下情况:

1) 我已经修改了所有T4 EF模板,以生成名为EntityName.gen.cs的文件.然后,我试图阻止TFS想要检入那些文件.我使用了正则表达式\.gen\.cs\z,它并没有改变任何事情!我什至没有\z和nadda尝试过它!

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\.cs\z and it didn't change a single thing! I even tried it without the \z and nadda!

2) 我不希望默认情况下检入app.config和web.config文件,因为我们将这些内容存储在构建脚本用来生成每个环境的app.config.base和web.config.base文件中app.config和web.config文件.因此,我尝试了以下正则表达式,但仍然没有任何效果! web\.config\zapp\.config\zweb\.release\.config\zweb\.debug\.config\z.

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\.config\z, app\.config\z, web\.release\.config\z and web\.debug\.config\z.

我搞砸了什么?

推荐答案

以下是我们使用的一组表达式.我们已经安装了 2011年12月Team Foundation Power Tools ,它是禁止模式策略功能来自哪里,而不是来自基本的TFS 2010安装.

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.

这篇关于TFS 2010中的禁止模式检入策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆