package com.perforce.cvs; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class RevisionSorter { private int index = 0; private List<RevisionEntry> list = new ArrayList<RevisionEntry>(); 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; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 10826 | Paul Allen |
Experiment with H2 Java database. CVS revisions are stored as Blobs with an ID, the RevisionSorter uses the ID and accesses the Blobs to sort change order. Database is located in ${CWD}/db/rev.* |
||
#1 | 10825 | Paul Allen | Branching using paul_allen.p4convert | ||
//guest/perforce_software/p4convert/src/com/perforce/cvs/RevisionSorter.java | |||||
#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) |