continuous integration - How to get CruiseControl.NET working with Mercurial: "Source control failure (GetModifications)" -
i'm trying set cruisecontrol.net 1.5.7256.1 automatic builds. project stored in mercurial, , i'm using following ccnet.config:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder"> <project name="slider" weburl="http://localhost/ccnet"> <triggers> <intervaltrigger seconds="3600" /> </triggers> <sourcecontrol type="hg" autogetsource="true"> <executable>c:\python26\scripts\hg.bat</executable> <repo>c:\repos\slider</repo> <workingdirectory>c:\ccnet\slider</workingdirectory> </sourcecontrol> <tasks> <msbuild> <executable>c:\windows\microsoft.net\framework64\v4.0.30319\msbuild.exe</executable> <workingdirectory>c:\ccnet\slider</workingdirectory> <projectfile>slider.sln</projectfile> <buildargs>/noconsolelogger /p:configuration=debug /v:diag</buildargs> <targets>slider</targets> <timeout>900</timeout> <logger>c:\program files (x86)\cruisecontrol.net\server\thoughtworks.cruisecontrol.msbuild.dll</logger> </msbuild> </tasks> </project> </cruisecontrol> but when force build, error:
[slider:warn] source control failure (getmodifications): source control operation failed: < unexpected @ time. . process command: c:\python26\scripts\hg.bat log -r 0:123 --template <modification><node>{node|short}</node><author>{author|user}</author><date>{date|rfc822date}</date><desc>{desc|escape}</desc><rev>{rev}</rev><email>{author|email|obfuscate}</email><files>{files}</files></modification> --noninteractive [slider:info] integration complete: exception - 12/2/2010 1:19:08 pm the error presumably caused unquoted angle brackets in --template parameter, how can make cc.net put quotes around parameter?
===============
here's hg.bat:
@echo off rem windows driver script mercurial setlocal set hg=%~f0 rem use full path python (relative script) standard python rem install not put python.exe on path... rem %~dp0 directory of script %~dp0..\python "%~dp0hg" %* endlocal
i'm using cruisecontrol.net 1.5.7256.1 mercurial installed msi, using full path of hg.exe executable value.
in project\core\sourcecontrol\mercurial\mercurial.cs template used this:
buffer.addargument("--template", historytemplate) and formatted command line this:
string.format("{0}{1}{2}", arg, separator, stringutil.autodoublequotestring(value)) where separator " ", , autodoublequotestring quote template, can't cause of error.
update 1
actually, autodoublequotestring should quote template, in current version doesn't it. also, if build succeeds when using hg.exe, running actual command line in command prompt returns same error.
update 2
cruisecontrol.net 1.6.7981.1 released (see release notes), , since template passed file, works fine (at least on pc).
Comments
Post a Comment