I have a central hg repository with multiple subprojects in it. Somewhat like this:
/Hg_central
/subproject-a
/subproject-b
/...
I am trying to set up a cc.net server so that it builds a subproject ONLY if its directory has been updated.
My current problem is once one of the subprojects has been updated and built, the server will not find any modifications for the other subprojects, since mercurial has updated the whole repository. CC.NET will not build the other subprojects, unless another update has been done. I've tried using inclusionFilters without success. I also can't afford to have a seperate WorkingDirectory for each subproject. What 开发者_如何转开发am I missing to make this possible?
My ccnet config file is currently like this:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="subproject-a">
<workingDirectory>G:\Hg-clone\</workingDirectory>
<triggers>
<intervalTrigger name="continuous" seconds="60" buildCondition="IfModificationExists" initialSeconds="20" />
</triggers>
<sourcecontrol type="filtered">
<inclusionFilters>
<pathFilter>
<pattern>/subproject-a/**/*</pattern>
</pathFilter>
</inclusionFilters>
<sourceControlProvider type="hg" autoGetSource="true" >
<repo>http://myserver/myproject</repo>
<multipleHeadsFail>false</multipleHeadsFail>
</sourceControlProvider>
</sourcecontrol>
<tasks>
<exec>
<executable>mybuild.bat</executable>
</exec>
</tasks>
</project>
<project name="subproject-b">
<workingDirectory>G:\Hg-clone\</workingDirectory>
<triggers>
<intervalTrigger name="continuous" seconds="60" buildCondition="IfModificationExists" initialSeconds="20" />
</triggers>
<sourcecontrol type="filtered">
<inclusionFilters>
<pathFilter>
<pattern>/subproject-b/**/*</pattern>
</pathFilter>
</inclusionFilters>
<sourceControlProvider type="hg" autoGetSource="true" >
<repo>http://myserver/myproject</repo>
<multipleHeadsFail>false</multipleHeadsFail>
</sourceControlProvider>
</sourcecontrol>
<tasks>
<exec>
<executable>mybuild.bat</executable>
</exec>
</tasks>
</project>
</cruisecontrol>
With svn this works like a charm, so i'm a bit surprised mercurial isn't.
Either way, a possible workaround is to define a single project whose purpose is to update source and all other project should have a Project trigger for that project.
HTH
精彩评论