We've had problems with this bug as well.
Seems like some external definitions makes handleLogEntry call substring with an index out of range. I guess localPath is sometimes shorter than relativeUrl.
I've included a work-around below, it seems to work for me but haven't yet been thoroughly tested.
Is this function only used to create the changelog presented to the user? Or are there other side-effects?

diff --git a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
index 75e569c..faa3515 100644
--- a/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
+++ b/src/main/java/hudson/scm/DirAwareSVNXMLLogHandler.java
@@ -16,6 +16,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
+import java.util.regex.Pattern;

 import org.tmatesoft.svn.core.ISVNLogEntryHandler;
 import org.tmatesoft.svn.core.SVNErrorCode;
@@ -87,7 +88,7 @@ public class DirAwareSVNXMLLogHandler extends SVNXMLLogHandler implements ISVNLo
           Map<String, SVNLogEntryPath> changedPaths = new HashMap<String, SVNLogEntryPath>();
           for (SVNLogEntryPath entry : logEntry.getChangedPaths().values()) {
               String localPath = entry.getPath().substring(1); // path in svn log start with a '/'
-              localPath = relativePath + localPath.substring(relativeUrl.length());
+              localPath = relativePath + localPath.replaceFirst(Pattern.quote(relativeUrl),"");
               // can't use entry.setPath(localPath) as FSPathChange duplicate myPath attribute then setPath().getPath() don't return same value
               changedPaths.put(localPath, new SVNLogEntryPath(localPath, entry.getType(), entry.getCopyPath(), entry.getCopyRevision()));
           }
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to