package org.jenkinsci.plugins.p4.changes; import java.io.Serializable; import org.jenkinsci.plugins.p4.client.ClientHelper; public class P4Revision implements Serializable { private static final long serialVersionUID = 1L; private final int change; private final String label; private final boolean isLabel; public P4Revision(String label) { this.change = -1; this.label = label; this.isLabel = true; } public P4Revision(int change) { this.change = change; this.label = null; this.isLabel = false; } public boolean isLabel() { return isLabel; } public String toString() { if (isLabel) { return label; } else { return Integer.toString(change); } } public int getChange() { return change; } public P4ChangeEntry getChangeEntry(ClientHelper p4) throws Exception { P4ChangeEntry cl = new P4ChangeEntry(); if (isLabel) { cl.setLabel(p4, label); } else { cl.setChange(p4, change); } return cl; } @Override public boolean equals(Object obj) { if (obj instanceof P4Revision) { P4Revision rev = (P4Revision) obj; if (rev.toString().equals(toString())) { return true; } } return false; } @Override public int hashCode() { int hash = 3; hash = 89 * hash + (toString().hashCode()); return hash; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 21077 | Paul Allen |
Switch polling back to build.xml Change in Polling behaviour; use last build details in the build.xml file. It gathers 'last' change details on the master thread and not a slave thread. JENKINS-37462 - updated and improved test case |
||
#6 | 20787 | Paul Allen |
Polling Fix for use with quiet period. Switched all uses of change/label to P4Revision object and implemented Comparable. The changes to build are now calculated at build time (after the quiet period) not during the polling phase. JENKINS-36883 #review-20780 |
||
#5 | 20179 | Paul Allen | Javadoc fixes for java 8 builds. | ||
#4 | 19365 | Paul Allen |
Track syncs with a 'Change' field in the Workspace Description. Polling used ‘p4 cstat’ to determine the last sync’ed change in a workspace. However, if the have list is empty (such as in the Force Clean Populate mode) it would appear as if no changes have been synced. JENKINS-32518 JENKINS-32523 |
||
#3 | 16390 | Paul Allen |
Update change/file reporting. Use `p4 changes @=1234` to get change summary and `p4 files -m50 @=1234` to get limited file list. |
||
#2 | 15808 | Paul Allen |
Make P4Revision Serializable. JENKINS-30425 |
||
#1 | 15750 | Paul Allen |
Use a P4Revision object and not int/String as Object. In sure that there is no ambiguity with the revision specifier. Should fix change summary when using the Workflow plugin. JENKINS-30425 |