我使用Mercurial源代码管理块配置了CruiseControl.NET。当我第一次执行构建时,代码是从我的窑存储库下载的,构建顺利进行了。但是,每个后续构建都失败了,我相信原因是因为hg.exe pull返回了一个1的“错误”代码,表示没有检测到任何更改。我使用验证了返回代码。问题是,CruiseControl.NET显然将此视为一个失败的条件,但我更希望它不把尝试看作是一个构建。我的经验是,对于其他源代码管理系统,如果存储库中没有任何更改,CruiseControl.NET就不会做任何事情。
[Project:DEBUG] Starting process [C:\Program Files\Mercurial\hg.exe] in working directory [D:\Working] with arguments [pull https://urlredacted]
[Project:DEBUG] Not setting PriorityClass on [C:\Program Files\Mercurial\hg.exe] to default Normal
[10:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] standard-error stream closed -- null received in event
[9:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] pulling from https://urlredacted
[6:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] process exited event received
[9:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] searching for changes
[9:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] no changes found
[9:DEBUG] [Project C:\Program Files\Mercurial\hg.exe] standard-output stream closed -- null received in event
[Project:WARN] Source control failure (GetModifications): Source control operation failed: . Process command: C:\Program Files\Mercurial\hg.exe pull https://urlredacted我的问题是,如果CruiseControl.NET在1中拉出结果,是否可以使用hg.exe配置来忽略构建尝试,还是必须修改CruiseControl.NET代码?
我使用的是CruiseControl.NET 1.6和Mercurial 2.1。
发布于 2012-02-09 22:48:45
问题是Mercurial 2.1在没有提取变更集的情况下改变了return code for hg pull。这是一个向后不兼容的更改,现在必须更新脚本和工具才能考虑到这一点。
我希望下一个版本的CruiseControl.NET会考虑到这一点。同时,可以使用一个小批处理文件(正如您在评论中所建议的)。
https://stackoverflow.com/questions/9215000
复制相似问题