Skip to content
Permalink
Browse files

[JENKINS-13669] willemv advocates simply failing the polling operatio…

…n if possiblyCachedRepo is null.
  • Loading branch information
jglick committed Mar 18, 2013
1 parent 8f3d32c commit 1576c70a2c753480857391757b8c059b39fda880
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/main/java/hudson/plugins/mercurial/MercurialSCM.java
@@ -239,10 +239,11 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,
if (!requiresWorkspaceForPolling()) {
launcher = Hudson.getInstance().createLauncher(listener);
PossiblyCachedRepo possiblyCachedRepo = cachedSource(Hudson.getInstance(), launcher, listener, true);
if (possiblyCachedRepo != null) {
FilePath repositoryCache = new FilePath(new File(possiblyCachedRepo.getRepoLocation()));
return compare(launcher, listener, baseline, output, Hudson.getInstance(), repositoryCache);
if (possiblyCachedRepo == null) {
throw new IOException("Could not use cache to poll for changes. See error messages above for more details");
}
FilePath repositoryCache = new FilePath(new File(possiblyCachedRepo.getRepoLocation()));
return compare(launcher, listener, baseline, output, Hudson.getInstance(), repositoryCache);
}
// XXX do canUpdate check similar to in checkout, and possibly return INCOMPARABLE

0 comments on commit 1576c70

Please sign in to comment.
You can’t perform that action at this time.