From ef2e13bbf4fe31c9cb27b54fadfa55307689d34f Mon Sep 17 00:00:00 2001 From: jbq Date: Wed, 19 Sep 2007 13:12:53 +0000 Subject: [PATCH] Issue number: 826 Provide a useful error message git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4813 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/scm/SubversionChangeLogBuilder.java | 4 ++++ core/src/main/java/hudson/scm/SubversionSCM.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/scm/SubversionChangeLogBuilder.java b/core/src/main/java/hudson/scm/SubversionChangeLogBuilder.java index 10afb9e69d..9abc46ee0a 100644 --- a/core/src/main/java/hudson/scm/SubversionChangeLogBuilder.java +++ b/core/src/main/java/hudson/scm/SubversionChangeLogBuilder.java @@ -96,6 +96,10 @@ final class SubversionChangeLogBuilder { return false; } Long thisRev = thisRevisions.get(url); + if (thisRev == null) { + listener.error("No revision found for URL: " + url + " in " + SubversionSCM.getRevisionFile(build) + ". Revision file contains: " + thisRevisions.keySet()); + return true; + } if(thisRev.equals(prevRev)) { logger.println("no change for "+url+" since the previous build"); return false; diff --git a/core/src/main/java/hudson/scm/SubversionSCM.java b/core/src/main/java/hudson/scm/SubversionSCM.java index eceb0bca7c..21a27bb772 100644 --- a/core/src/main/java/hudson/scm/SubversionSCM.java +++ b/core/src/main/java/hudson/scm/SubversionSCM.java @@ -555,7 +555,7 @@ public class SubversionSCM extends SCM implements Serializable { /** * Gets the file that stores the revision. */ - private static File getRevisionFile(AbstractBuild build) { + public static File getRevisionFile(AbstractBuild build) { return new File(build.getRootDir(),"revision.txt"); }