'hg 拉' CruiseControl.NET 构建失败,因为未检测到任何更改

发布于 2025-01-04 05:31:51 字数 1433 浏览 1 评论 0原文

我使用 Mercurial 源控制块配置了 CruiseControl.NET。当我第一次执行构建时,代码是从我的 Kiln 存储库下载的,并且构建顺利进行。然而,随后的每个构建都会失败,我相信原因是 hg.exe pull 返回“错误”代码 1,表明没有检测到任何更改。我使用 Process Explorer 验证了返回代码。问题是,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

我的问题是,如果 hg.exe pull 结果为 1,我是否可以使用 CruiseControl.NET 配置让它忽略构建尝试,或者我是否必须去修改 CruiseControl。网络代码?

我正在使用 CruiseControl.NET 1.6 和 Mercurial 2.1。

I have CruiseControl.NET configured using the Mercurial source control block. When I first executed the build, the code was downloaded from my Kiln repository and the build went off without a hitch. However, every subsequent build fails, and I believe the reason is because hg.exe pull is returning an "error" code of 1 indicating there were no changes detected. I verified the return code by using Process Explorer. The thing is, CruiseControl.NET is apparently treating this as a failure condition but I'd prefer if it simply did not treat the attempt as a build. It's been my experience that with other source control systems, CruiseControl.NET will simply do nothing if there are no changes in the repository.

[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

My question is, is there a CruiseControl.NET configuration I can use to get it to ignore the build attempt if hg.exe pull results in a 1, or am I going to have to go modify CruiseControl.NET code?

I'm using CruiseControl.NET 1.6 and Mercurial 2.1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

生寂 2025-01-11 05:31:51

问题是 Mercurial 2.1 更改了 hg pull 的返回代码没有拉动任何变更集。这是向后不兼容的更改,现在必须更新脚本和工具才能考虑到这一点。

我希望 CruiseControl.NET 的下一版本能够考虑到这一点。同时,可以使用一个小批处理文件(正如您在评论中所建议的那样)。

The problem is that Mercurial 2.1 changed the return code for hg pull when no changesets were pulled. That is a backwards incompatible change and scripts and tools will now have to be updated to take this into account.

I expect the next version of CruiseControl.NET to take this into account. In the mean time, a small batch file can be used (as you suggest in your comment).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文