package org.jenkinsci.plugins.p4.populate; import hudson.model.AutoCompletionCandidates; import hudson.model.Descriptor; import java.util.List; import org.jenkinsci.plugins.p4.client.ConnectionFactory; import org.kohsuke.stapler.QueryParameter; import com.perforce.p4java.core.ILabelSummary; import com.perforce.p4java.option.server.GetLabelsOptions; import com.perforce.p4java.server.IOptionsServer; public abstract class PopulateDescriptor extends Descriptor<Populate> { public PopulateDescriptor(Class<? extends Populate> clazz) { super(clazz); } protected PopulateDescriptor() { } public AutoCompletionCandidates doAutoCompletePin( @QueryParameter String value) { AutoCompletionCandidates c = new AutoCompletionCandidates(); try { IOptionsServer iserver = ConnectionFactory.getConnection(); if (iserver != null && value.length() > 0) { List<ILabelSummary> list; GetLabelsOptions opts = new GetLabelsOptions(); opts.setMaxResults(10); opts.setNameFilter(value + "*"); list = iserver.getLabels(null, opts); for (ILabelSummary l : list) { c.add(l.getName()); } } } catch (Exception e) { } return c; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11053 | Paul Allen | Branching using p4-jenkins | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/populate/PopulateDescriptor.java | |||||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4/populate/PopulateDescriptor.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4_client/populate/PopulateDescriptor.java | |||||
#2 | 9472 | Paul Allen |
Added support to pin build at a label in the populate configuration. - includes help and updates to tests. |
||
#1 | 9115 | Paul Allen |
Initial implementation of workspace Cleanup and Sync options. - Includes 3 modes: Automatic Clean/Sync, Force Clean/Sync, Sync Only Automatic Clean/Sync Uses reconcile to clean up workspace and sync changes. Force Clean/Sync Force sync of all files (does not remove files yet...) Sync Only Normal sync with no cleanup TODO: - remove of files in Force Clean/Sync mode - Inline help - Update docs - Add unit/functional tests |