views:

471

answers:

1

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?

+4  A: 

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
Ry4an