如何限制仅在签入时评估的自定义TFS签入策略?

如何限制仅在签入时评估的自定义TFS签入策略?

问题描述:

我创建了一个自定义TFS签入策略,需要在签入时解析和评估源文件。

I have created a custom TFS checkin policy that needs to parse and evaluate the source files during checkin.

这可能是一个非常昂贵的过程,特别是如果有很多文件的话更改集的一部分。

This can be a quite expensive process, especially if many files are part of the changeset.

并且,在实际签入期间只需要对其进行一次评估。

And, it only needs to be evaluated exactly once during the actual checkin.

但是,当前框架调用了Evaluate方法很多次,甚至在用户启动签到之前。

However, currently the framework calls the Evaluate method many times, even before a checkin is initiated by the user.

例如,只要显示/更新Pending Changes窗口,框架就会调用Evaluate。

For example, any time the Pending Changes window is displayed / updated the framework calls Evaluate.

如何限制/避免这种情况?

How can I restrict / avoid this?

您好BullyOwner,

Hi BullyOwner,

感谢您在这里发帖。

我问过熟悉这个主题的人,他给了我以下反馈:

I asked someone familiar with this topic and he gave me the following feedback:

在办理登机手续之前,TFS评估工作目录中的挂起更改。这里TFS首次评估签到策略。如果政策评估失败,您会收到警告。一旦用户调用Check In Pending Changes命令或
只打开团队资源管理器中的Pending Changes视图,就会评估该策略。

https://blog.devart.com/creating-tfs-custom-check-in- policy-part-1.html

此外,如果可能,请检查以下类似帖子是否可以为您提供帮助:

Besides, if possible, please check if following similar thread could give you some help:

https://*.com / questions / 8744470 / how-do-i-control-when-my-custom-check-in-policy-is-evaluation-

如果以上对您没有帮助,请在
stackoveflow
上使用TFS标记打开一个新主题,因为此论坛是MSBuild。

If above not help you, please open a new thread on stackoveflow with TFS tag, since this forum is MSBuild.

该论坛上的更多社区成员和MVP可以进一步查看您的问题并提供更多建议。

More community members and MVP on that forum may further look at your issue and provide more suggestions.

感谢您的理解与合作。