mercurial support in CruiseControl.NET - how to clean & update build folder?

馋奶兔 提交于 2019-12-03 12:42:13

问题


I'm using the Mercurial source control block in CruiseControl.NET, and I have it set to autoGetSource but some of the files (such as version number, based on current time) change as part of the build. So for the next build, some of the files are changed so autoGetSource fails.

Is there a way I can tell CruiseControl.NET to do a hg update -C so changed files aren't a problem. Or is there a better way of cleaning out my build folder before starting a build?


回答1:


In a hgrc file, either in the project, on the CC server, or in the CC user's profile directory, you could put:

[defaults]
update = -C

or perhaps better (since [defaults] is frowned on)

[hooks]
pre-update = hg revert --all --no-backup



回答2:


The CC.NET Mercurial source control block has the following setting:

<revertModifications>true</revertModifications>

This will execute hg revert --all --no-backup before updating the source code for the build.

Also see <purgeModifications />

Ref.: CruiseControl.NET server configuration documentation



来源:https://stackoverflow.com/questions/2449646/mercurial-support-in-cruisecontrol-net-how-to-clean-update-build-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!