views:

207

answers:

4

I've setup a CCNET and on the whole it's working fine. It polls the SVN server and checks out the code if it sees any changes. Except, that is, when there is a checkin during the build. Currently the build and test run takes about 3 - 4 mins, if anyone checks in the code during the build crusie control does not recognise the checkin and waits until there is a checkin after the build has run.

Why might this be?

This is the svn portion of the ccnet.config file:

<sourcecontrol type="svn">
    <executable>svn.exe</executable>
    <trunkUrl>http://*******/svn/repos/psl/AcademyPro/ASP%20.Net/trunk/&lt;/trunkUrl&gt;
    <workingDirectory>C:\CrusieControlProjects\AcademyPro\</workingDirectory>
    <username>******</username>
    <password>******</password>
    <autoGetSource>true</autoGetSource>
</sourcecontrol>

Edited for Clarity The problem is not to do with atomic checkins. A checkin can complete, CCNET builds the app and starts running tests. At this point, someone else makes another checkin. Once the test run has completed I would expect CCNET to spot the checkin that was made during the test run.

This does not happen, the checkin is missed and a build that I'm expecting is missed.

Is this expected behaviour, or am I not understanding what @Jeff Mattfield was saying?

+1  A: 

A Subversion commit is atomic. It isn't available for checkout until it has completed without errors. Updating or checking out from a repository during a parallel commit results in the state of the repository before that commit.

In other words, CC.NET gets what the repository contained after the last successful commit.

A: 

I've never had this issue and I've been working with SVN+CCNet for a couple of years now.

  1. Can you post the whole CCNet project configuration? This might have something to do with triggers, for example.
  2. Which version of CCNet are you using?
  3. You say CCNet only detects the changes which occurred after the build. OK, but when you look at the project build report ("Modifications since last build"), does it show only those which occurred after the previous build or all of them (including the ones which occurred during the previous build)?
Igor Brejc
A: 

Check that ccservice.exe.config / ccnet.exe.config has debug log level set:

<configuration>
  <configSections>
  ...
    </log4net>
      <root>
        <level value="DEBUG"/>
      <root>
    </log4net>
  ...
  </configuration>
</configSections>

Then check the subversion output in the ccnet.log for the subversion revision.

2009-06-05 10:34:41,816 [15336:DEBUG] [cc-config svn.exe] <logentry
2009-06-05 10:34:41,816 [15336:DEBUG] [cc-config svn.exe]    revision="1057">

Make sure that revision is the latest revision with commits under the svn trunkUrl (http://***/svn/repos/psl/AcademyPro/ASP%20.Net/trunk/) path.

Otherwise check the log and state-file for more clues.

FkYkko
A: 

The time on the subversion server was about 2 hours out from the time on the cruisecontrol server. I fixed that and checkins now seem to be running much smoother.

ilivewithian