hudson.plugins.git.util
Class GerritBuildChooser

java.lang.Object
  extended by hudson.plugins.git.util.BuildChooser
      extended by hudson.plugins.git.util.GerritBuildChooser
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<BuildChooser>, java.io.Serializable

public class GerritBuildChooser
extends BuildChooser

See Also:
Serialized Form

Nested Class Summary
static class GerritBuildChooser.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.plugins.git.util.BuildChooser
gitSCM
 
Constructor Summary
GerritBuildChooser()
           
 
Method Summary
 java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall, java.lang.String singleBranch, IGitAPI git, hudson.model.TaskListener listener, BuildData data)
          Determines which Revisions to build.
 
Methods inherited from class hudson.plugins.git.util.BuildChooser
all, getDescriptor, getDisplayName, prevBuildForChangelog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GerritBuildChooser

@DataBoundConstructor
public GerritBuildChooser()
Method Detail

getCandidateRevisions

public java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall,
                                                            java.lang.String singleBranch,
                                                            IGitAPI git,
                                                            hudson.model.TaskListener listener,
                                                            BuildData data)
                                                     throws GitException,
                                                            java.io.IOException
Determines which Revisions to build. Uses git log --all to get every commit in repository. Then orders commits by commit time and determines what to build next. Doesn't care about branches.

Specified by:
getCandidateRevisions in class BuildChooser
Parameters:
isPollCall - true if this method is called from pollChanges.
singleBranch - contains the name of a single branch to be built this will be non-null only in the simple case, in advanced cases with multiple repositories and/or branches specified then this value will be null.
Returns:
the candidate revision.
Throws:
java.io.IOException
GitException


Copyright © 2010. All Rights Reserved.