package com.perforce.cvs; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class RevisionSorter { private int index = 0; private long window = 0; private final boolean remainder; private List<RevisionEntry> list = new ArrayList<RevisionEntry>(); public RevisionSorter(boolean b) { remainder = b; } public void add(RevisionEntry entry) { list.add(entry); } public void sort() { Collections.sort((List<RevisionEntry>) list); } public String toString() { StringBuffer sb = new StringBuffer(); for (RevisionEntry c : list) { sb.append(c.toString()); sb.append("\n"); } return sb.toString(); } public RevisionEntry next() { if (hasNext()) { RevisionEntry entry = list.get(index); index++; return entry; } return null; } public boolean hasNext() { return (index < list.size()); } public boolean isEmpty() { return list.isEmpty(); } public void drop(RevisionEntry entry) { list.remove(entry); if (index > 0) { index--; } } public void reset() { index = 0; } public int size() { return list.size(); } public boolean isRemainder() { return remainder; } public long getWindow() { return window; } public void setWindow(long window) { this.window = window; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 12459 | Paul Allen | Ignore 12397 12405 | ||
#1 | 12446 | Paul Allen | Branching using p4convert-rusty | ||
//guest/perforce_software/p4convert/src/com/perforce/cvs/RevisionSorter.java | |||||
#5 | 10997 | Paul Allen |
CVS: use a dynamic time window when processing pseudo branches. - Prevent branches getting ahead of the source. - Used parent equals method in RevisionEntry to fix for drop method in RevisionSorter. |
||
#4 | 10984 | Paul Allen |
CVS: Tidy up logging - added revision count. |
||
#3 | 10944 | Paul Allen |
CVS change-list processing. Create a delayed list for pseudo branches to prevent them falling into the wrong change. - updated test cases 006 007 047 |
||
#2 | 10728 | Paul Allen |
CVS: new Label feature. Scans the RCS tree counting revisions on a branch. If the branch only has one revision it gets downgraded to a Label. Support added for Import and Convert mode. Activate using: com.p4convert.cvs.labels=true or in java Config.set(CFG.CVS_LABELS, true); (manual testing only -- automated tests will follow this change) |
||
#1 | 9807 | Paul Allen | Initial import of p4-convert (from change 894340) |