Skip to content
Permalink
Browse files

[FIXED JENKINS-13669] NPE when possiblyCachedRepo == null.

  • Loading branch information
jglick committed Mar 14, 2013
1 parent 25d1837 commit 8f3d32c85266e5bb34fc4337fb7299e59738061a
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/hudson/plugins/mercurial/MercurialSCM.java
@@ -239,8 +239,10 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,
if (!requiresWorkspaceForPolling()) {
launcher = Hudson.getInstance().createLauncher(listener);
PossiblyCachedRepo possiblyCachedRepo = cachedSource(Hudson.getInstance(), launcher, listener, true);
FilePath repositoryCache = new FilePath(new File(possiblyCachedRepo.getRepoLocation()));
return compare(launcher, listener, baseline, output, Hudson.getInstance(), repositoryCache);
if (possiblyCachedRepo != null) {
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 8f3d32c

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