package org.jenkinsci.plugins.p4.browsers; import hudson.scm.RepositoryBrowser; import org.jenkinsci.plugins.p4.changes.P4AffectedFile; import org.jenkinsci.plugins.p4.changes.P4ChangeEntry; import java.net.MalformedURLException; import java.net.URL; public abstract class P4Browser extends RepositoryBrowser<P4ChangeEntry> { private static final long serialVersionUID = 1L; private final URL url; P4Browser(String url) throws MalformedURLException { this.url = normalizeToEndWithSlash(new URL(url)); } public URL getUrl() { return url; } /** * Determines the link to the diff between the version. * * @param file Perforce file spec * @param change changelist number * @return null if the browser doesn't have any URL for diff. * @throws Exception push up stack */ public abstract URL getDiffLink(P4AffectedFile file, String change) throws Exception; /** * Determines the link to a single file under Perforce. This page should * display all the past revisions of this file, etc. * * @param file Perforce file spec * @return null if the browser doesn't have any suitable URL. * @throws Exception push up stack */ public abstract URL getFileLink(P4AffectedFile file) throws Exception; /** * Determines the link for associated Perforce jobs. * * @param job ID * @return null if the browser doesn't have any suitable URL. * @throws Exception push up stack */ public abstract URL getJobLink(String job) throws Exception; protected int parseRevision(P4AffectedFile file) { if (file.getRevision() == null || !file.getRevision().contains("#")) { // nothing to diff return -1; } String[] parts = file.getRevision().split("#"); return Integer.parseInt(parts[0]); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 24698 | Paul Allen | Fix for the revision number used by Swarm and other browsers. | ||
#6 | 22372 | Paul Allen |
Update Repository Browser for use with Pipeline. May fix the following: JENKINS-43069 JENKINS-37094 |
||
#5 | 22128 | Paul Allen |
Helix Graph support for Jenkins. JENKINS-40354 |
||
#4 | 20179 | Paul Allen | Javadoc fixes for java 8 builds. | ||
#3 | 19593 | Paul Allen | More minor fixes to satisfy FindBugs Analysis. | ||
#2 | 16409 | Paul Allen |
Use Fix records for Job information. 'p4 fixes' is lighter and still provides enough useful data. Includes jelly fix and extra job data in changelog.xml. |
||
#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/browsers/P4Browser.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/browsers/P4Browser.java | |||||
#1 | 8915 | Paul Allen |
Support for ChangeLog and RepoBrowser. - Added RepoBrowser for Swarm (porting the others should be easy) - ChangeLog XML file now only stores the changelist number all other information is fetched from Perforce |