use of com.intellij.cvsSupport2.cvsoperations.cvsMessages.CvsMessagesAdapter in project intellij-community by JetBrains.
the class StickyHeadGetter method getBranchHeadRevision.
@Nullable
protected String getBranchHeadRevision(final VirtualFile parent, final String name, final Convertor<CvsRevisionNumber, Boolean> chooser) {
final LocalPathIndifferentLogOperation operation = new LocalPathIndifferentLogOperation(new File(parent.getPath(), name));
final Ref<Boolean> logSuccess = new Ref<>(Boolean.TRUE);
final CvsExecutionEnvironment cvsExecutionEnvironment = new CvsExecutionEnvironment(new CvsMessagesAdapter(), CvsExecutionEnvironment.DUMMY_STOPPER, new ErrorProcessor() {
public void addError(VcsException ex) {
logSuccess.set(Boolean.FALSE);
}
public List<VcsException> getErrors() {
return null;
}
}, PostCvsActivity.DEAF, myProject);
try {
// should already be logged in
//operation.login(context);
operation.execute(cvsExecutionEnvironment, false);
} catch (VcsException | CommandAbortedException e) {
//
}
if (Boolean.TRUE.equals(logSuccess.get())) {
return extractRevision(operation, chooser);
}
return null;
}
Aggregations