[Issue 4741] New - Subversion SCM Polling: notifyCommit post-commit hook only reads first line

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Issue 4741] New - Subversion SCM Polling: notifyCommit post-commit hook only reads first line

                 Issue #|4741
                 Summary|Subversion SCM Polling: notifyCommit post-commit hook
                        |only reads first line
       Status whiteboard|
              Issue type|DEFECT
             Assigned to|issues@hudson
             Reported by|fireresq

------- Additional comments from [hidden email] Fri Oct 30 12:50:16 +0000 2009 -------
we are using version 1.327

Hi, we've been trying to setup SCM polling to alert hudson to changes in our
subversion repos as documented in:

It seems there's a bug in that the mechanism only reads the first line of the
POST http body, thus only the first SVN url in the changeset will be compared
against to determine what jobs are polled.

We've setup some debug scripts to manually send notifies in the same way we'd
trigger via a subversion post-commit hook, and are able to examine the data
we're sending and verify that all the lines from our "svnlook changed" are being
sent correctly in the request.

Cranking up the debug output in hudson shows that the class handling the
response is only reading in the first line.  The file is
SubversionRepositoryStatus.java found here:


The relevant code:

while((line=new BufferedReader(req.getReader()).readLine())!=null) {
    LOGGER.finer("Reading line: "+line);

It seems the problem is the while loop, you can typically only invoke
getReader() once per HTTPServletRequest, so moving it out of the loop should
resolve the issue.

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]