use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsAnnotationProvider method executeOperation.
private AnnotateOperation executeOperation(File file, String revision, CvsEnvironment root, boolean binary, boolean retryOnFailure) throws VcsException {
final AnnotateOperation operation = new AnnotateOperation(file, revision, root, binary);
final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
executor.performActionSync(new CommandCvsHandler(CvsBundle.getAnnotateOperationName(), operation), CvsOperationExecutorCallback.EMPTY);
final CvsResult result = executor.getResult();
if (result.hasErrors()) {
if (!retryOnFailure) {
throw result.composeError();
}
for (VcsException error : result.getErrors()) {
for (String message : error.getMessages()) {
if (message.contains(INVALID_OPTION_F) || message.contains(USAGE_CVSNTSRV_SERVER)) {
ourDoNotAnnotateBinaryRoots.add(root.getCvsRootAsString());
return executeOperation(file, revision, root, false, false);
}
}
}
throw result.composeError();
}
return operation;
}
Aggregations