TF错误:没有其他要签入的更改 [英] TF error: There are no remaining changes to check in

查看:117
本文介绍了TF错误:没有其他要签入的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为TeamCity构建项目之一,我们有一个NAnt脚本来更新TFS中的预构建"程序集.该构建由其他构建触发.它执行TF签出,移动一些文件,然后执行TF签入.

We have an NAnt script to update our "pre-built" assemblies in TFS as one of our TeamCity build projects. The build is triggered by other builds. It does a TF checkout, moves some files, then does a TF checkin.

相关目标(tf解析为TF.exe的路径):

The relevant target (tf resolves to the path of TF.exe):

<target name="checkin.assemblies">
  <exec program="${tf}">
    <arg value="checkin" />
    <arg value="${dir.assemblies}" />
    <arg value="/comment:${message}." />
    <arg value="/noprompt" />
    <arg value="/recursive" />
   </exec> 
</target>

通常,我们得到:

Checking in edit: ...
The following changes were not checked in because the items were not modified.
Undoing edit: ...
There are no remaining changes to check in.
External Program Failed: E:\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe (return code was 1)
Process exited with code 1
BUILD FAILED - 0 non-fatal error(s), 1 warning(s)

我认为正在发生的是该构建被触发了太多次(有多个构建可以触发它).如果我们要更新的文件没有更改,则TFS跳过检入,有帮助"返回错误代码.不幸的是,对于锁定签出"错误,它也会返回1,这很严重.

What I think is happening is the build gets triggered once too many times (there are several builds that can trigger it). If the files we want to update didn't change, TFS skips the check-in and "helpfully" returns an error code. Unfortunately it will also return 1 for "locked for check-out" errors, which are severe.

供参考: TF命令行退出代码

解决方法很简单,但很烦人-释放其中一个会破坏程序集版本号的版本,然后触发此版本.

The workaround is simple but annoying - fire off one of the builds that will bump an assembly's version number and then trigger this build.

我们如何可靠地完成这项工作?

How can we make this work reliably?

更新:我们最终修改了TeamCity的构建触发配置,以创建构建链",以确保仅触发一次签入.

Update: We ended up revising the build triggering configurations for TeamCity to create build "chains," insuring that checkin only gets triggered once.

推荐答案

对于tf checkin,有一种记录在案的命令行参数称为/force.在用法和MSDN中,它在中列出,但未在任何地方进行描述.

There is a kind-of documented command line parameter for tf checkin called /force. It's listed in the usage and on MSDN, but it's not described anywhere.

这将设置 CheckinParameters.AllowUnchangedContent 标志,并允许您检入没有更改的文件.这应该可以解决您的问题.

This sets the CheckinParameters.AllowUnchangedContent flag and allows you to check-in a file that has no changes. This should solve your problem.

这篇关于TF错误:没有其他要签入的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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