}
targetNode.getSession().save();
}
private void computeDifferences() throws RepositoryException {
JCRVersionHistory vh = (JCRVersionHistory) sourceNode.getVersionHistory();
VersionIterator targetHistory = targetNode.getVersionHistory().getAllLinearVersions();
List<String> targetHistoryList = new ArrayList<String>();
while (targetHistory.hasNext()) {
targetHistoryList.add(targetHistory.nextVersion().getName());
}
JCRVersion sourceVersion = vh.getVersion(sourceNode.getBaseVersion().getName());
JCRVersion baseSourceVersion = null;
JCRVersion baseTargetVersion = null;
while (baseSourceVersion == null) {
JCRVersion[] successors = sourceVersion.getSuccessors();
for (JCRVersion successor : successors) {