use of org.tigris.subversion.subclipse.ui.compare.SVNCompareEditorInput in project subclipse by subclipse.
the class MergeWizardRevisionsPage method compareRevisions.
private void compareRevisions() {
IStructuredSelection sel = (IStructuredSelection) changePathsViewer.getSelection();
Object sel0 = sel.getFirstElement();
if (sel0 instanceof LogEntryChangePath) {
LogEntryChangePath logEntryChangePath = (LogEntryChangePath) sel0;
try {
if (!logEntryChangePath.getRemoteResource().isContainer()) {
ISVNRemoteResource left = logEntryChangePath.getRemoteResource();
compareInput = compareInputMap.get(left.getUrl().toString() + left.getRevision());
boolean run = compareInput == null;
if (compareInput == null) {
SVNRevision.Number selectedRevision = (SVNRevision.Number) left.getRevision();
SVNRevision.Number previousRevision = new SVNRevision.Number(selectedRevision.getNumber() - 1);
ISVNRemoteResource right = new RemoteFile(left.getRepository(), left.getUrl(), previousRevision);
compareInput = new SVNCompareEditorInput(new ResourceEditionNode(left), new ResourceEditionNode(right));
compareInputMap.put(left.getUrl().toString() + left.getRevision(), compareInput);
}
setCompareInput(compareInput, run);
showComparePane(true);
}
} catch (Exception e) {
MessageDialog.openError(getShell(), Messages.MergeWizardRevisionsPage_5, e.getMessage());
}
}
}
use of org.tigris.subversion.subclipse.ui.compare.SVNCompareEditorInput in project subclipse by subclipse.
the class MergeWizardUnblockRevisionsPage method compareRevisions.
private void compareRevisions() {
IStructuredSelection sel = (IStructuredSelection) changePathsViewer.getSelection();
Object sel0 = sel.getFirstElement();
if (sel0 instanceof LogEntryChangePath) {
LogEntryChangePath logEntryChangePath = (LogEntryChangePath) sel0;
try {
if (!logEntryChangePath.getRemoteResource().isContainer()) {
ISVNRemoteResource left = logEntryChangePath.getRemoteResource();
compareInput = compareInputMap.get(left.getUrl().toString() + left.getRevision());
boolean run = compareInput == null;
if (compareInput == null) {
SVNRevision.Number selectedRevision = (SVNRevision.Number) left.getRevision();
SVNRevision.Number previousRevision = new SVNRevision.Number(selectedRevision.getNumber() - 1);
ISVNRemoteResource right = new RemoteFile(left.getRepository(), left.getUrl(), previousRevision);
compareInput = new SVNCompareEditorInput(new ResourceEditionNode(left), new ResourceEditionNode(right));
compareInputMap.put(left.getUrl().toString() + left.getRevision(), compareInput);
}
setCompareInput(compareInput, run);
showComparePane(true);
}
} catch (Exception e) {
MessageDialog.openError(getShell(), Messages.MergeWizardRevisionsPage_5, e.getMessage());
}
}
}
Aggregations