// parent revisions have been processed first
List<VcsRevisionNumber> orderedRevisions = new ArrayList<VcsRevisionNumber>(revisionsByRevNumber.keySet());
List<TreeItem<VcsFileRevision>> result = new ArrayList<TreeItem<VcsFileRevision>>(orderedRevisions.size());
Collections.sort(orderedRevisions);
for (VcsRevisionNumber revisionNumber : orderedRevisions) {
VcsFileRevision revision = revisionsByRevNumber.get(revisionNumber);
TreeItem<VcsFileRevision> treeItem = new TreeItem<VcsFileRevision>(revision);
treeItemMap.put(revisionNumber, treeItem);
// now look for parents and set parent/child relationships
String parentRevString = ((MksRevisionNumber) revisionNumber).getParentRevision();
try {