git - Cruise Control .net git 日志无效修订范围

标签 git cruisecontrol.net

我设法搞砸了我的 Cruise Control 项目。

在移动到新的源代码管理主机时,我正在更新持续集成服务器上项目存储库的 Git URL。我有点高兴地剪切和粘贴并将错误的存储库 URL 粘贴到源中。因此,下一次 Cruise Control 进行 pull 时,它 merge 并 pull 了很多不应该在存储库中的东西。

一旦我意识到我的错误,我认为这不是问题,我将删除有问题的存储库并使用正确的 URL 进行克隆。

除了 Cruise Control 似乎已经从困惑的存储库中记住了最后的更改集,并且在决定是否需要进行新构建时它会发出嘶嘶声。无论如何,这就是我的猜测。当它发出 git log 命令时,它说它无法在清理后的存储库中找到更改集。

它发出的命令是:

git log 66cd57438ea42b4f8cb6dbf033dc1162f61a4d54..origin/master --name-status --pretty=format:"Commit:%H%nTime:%ci%nAuthor:%an%nE-Mail:%ae%nMessage:%s%n%n%b%nChanges:" -m

Git 的响应是

Source control operation failed: fatal: Invalid revision range 66cd57438ea42b4f8cb6dbf033dc1162f61d5e65..origin/master

变更集 ID 肯定不存在于正确的存储库中,但确实存在于我错误 merge 的存储库中。

如何让 Cruise Control .net 忘记 duff 变更集 ID?

最佳答案

CruiseControl.net 将最后一次提交的 ID 存储在每个项目的 state 文件中。 这些通常是驻留在服务器目录 (c:\Program Files (x86)\CruiseControl.NET\server) 中的文本文件

例如 状态文件可能包含:

<IntegrationResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" scmError="false">
  <ProjectName>Project1</ProjectName>
  ...
  <Label>1.2.3.4</Label>
  <Parameters>
    ...
    <NameValuePair name="$LastChangeNumber" value="66cd57438ea42b4f8cb6dbf033dc1162f61a4d54" />
  </Parameters>
  <LastSuccessfulIntegrationLabel>1.2.3.4</LastSuccessfulIntegrationLabel>
  <SourceControl name="commit" value="66cd57438ea42b4f8cb6dbf033dc1162f61a4d54" />
</IntegrationResult>

您可以修改此文件以包含与您的正确存储库相关的提交 ID;但是您必须先停止 CruiseControl。全部更改后重新启动服务器/服务,一切都应该是好的。

唯一需要更改的行是:

  <SourceControl name="commit" value="66cd57438ea42b4f8cb6dbf033dc1162f61a4d54" />

其他属性可以保持原样;它们只是上次构建的属性。

关于git - Cruise Control .net git 日志无效修订范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26345462/

相关文章:

git - 将多个 hg 存储库转换为具有多个分支的单个 git 存储库

c# - Watin 测试在 Visual Studio 中运行,但不能在 CCNet 中作为 Windows 服务运行

CruiseControl.net 1.5.7256.1 : my build fails but the dashboard shows success

cruisecontrol.net - 如何将项目添加到CruiseControl.NET?

.net - CI : Hudson with . 网络与 CruiseControl.Net

linux - 查看远程 Linux 服务器上的 git 存储库 -> 在 Windows 中?

git - 如何根据公共(public)注册表中的 git 标签创建 Docker 镜像?

git - 支持 Git 子模块的 Git 最低版本

svn - Cruise Control.Net 最佳实践

git - Powershell 在每次 pull 时而不是在启动时要求 git RSA 密码?