Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

[FIXED JENKINS-10880] check for existing lastBuild #65

Merged
merged 1 commit into from about 2 years ago

3 participants

marc-guenther BuildHive Kohsuke Kawaguchi
marc-guenther
Collaborator

Fix the NPE when there was no lastBuild available with
fast remote polling enabled

BuildHive

Jenkins » git-plugin #4 FAILURE
Looks like there's a problem with this pull request
(what's this?)

Marc Guenther [FIXED JENKINS-10880] check for existing lastBuild
Fix the NPE when there was no lastBuild available with
fast remote polling enabled
91cc5c9
BuildHive

Jenkins » git-plugin #27 SUCCESS
This pull request looks good
(what's this?)

marc-guenther
Collaborator

just rebased against the current master, contents are the same as before. The failure from 3 months ago had nothing to do with this change.

Kohsuke Kawaguchi kohsuke merged commit 0551fc3 into from
Kohsuke Kawaguchi kohsuke closed this
Kohsuke Kawaguchi
Owner

My apologies for the delay in coming back to this.

I've added you as a committer to the repository so that you won't be blocked for changes like this.

BuildHive

Jenkins » git-plugin #31 UNSTABLE
Looks like this commit caused a build failure
(what's this?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 2 authors.

Jun 25, 2012
Marc Guenther [FIXED JENKINS-10880] check for existing lastBuild
Fix the NPE when there was no lastBuild available with
fast remote polling enabled
91cc5c9
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 src/main/java/hudson/plugins/git/GitSCM.java
5 src/main/java/hudson/plugins/git/GitSCM.java
@@ -662,13 +662,14 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,
662 662
663 663 final BuildData buildData = fixNull(getBuildData(lastBuild, false));
664 664
665   - if (buildData != null && buildData.lastBuild != null) {
  665 + if (buildData.lastBuild != null) {
666 666 listener.getLogger().println("[poll] Last Built Revision: " + buildData.lastBuild.revision);
667 667 }
668 668
669 669 final String singleBranch = getSingleBranch(lastBuild);
670 670
671   - if (singleBranch != null && this.remotePoll) {
  671 + // fast remote polling needs a single branch and an existing last build
  672 + if (this.remotePoll && singleBranch != null && buildData.lastBuild != null && buildData.lastBuild.getRevision() != null) {
672 673 String gitExe = "";
673 674 GitTool[] installations = ((hudson.plugins.git.GitTool.DescriptorImpl)Hudson.getInstance().getDescriptorByType(GitTool.DescriptorImpl.class)).getInstallations();
674 675 for(GitTool i : installations) {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.