mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SCR43762 fixed
This commit is contained in:
@@ -98,20 +98,10 @@ public class CvsStandardOperationsProvider implements StandardOperationsProvider
|
||||
|
||||
public void commit(Object parameters) throws VcsException {
|
||||
getCurrentTransaction().setMessage(parameters);
|
||||
executeOperation("Commit Transaction", getCurrentTransaction());
|
||||
CvsVcs2.executeOperation("Commit Transaction", getCurrentTransaction(), myProject);
|
||||
myCurrentTransaction = null;
|
||||
}
|
||||
|
||||
private void executeOperation(String title, CvsOperation operation) throws VcsException {
|
||||
CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
|
||||
executor.performActionSync(new CommandCvsHandler(title, operation),
|
||||
CvsOperationExecutorCallback.EMPTY);
|
||||
CvsResult result = executor.getResult();
|
||||
if (!result.hasNoErrors()){
|
||||
throw result.composeError();
|
||||
}
|
||||
}
|
||||
|
||||
public void rollback() {
|
||||
myCurrentTransaction = null;
|
||||
}
|
||||
@@ -119,7 +109,7 @@ public class CvsStandardOperationsProvider implements StandardOperationsProvider
|
||||
public byte[] getFileContent(String path) throws VcsException {
|
||||
try {
|
||||
GetFileContentOperation command = GetFileContentOperation.createForFile(CvsVfsUtil.findFileByIoFile(new File(path)));
|
||||
executeOperation("Get File Content", command);
|
||||
CvsVcs2.executeOperation("Get File Content", command, myProject);
|
||||
return command.getFileBytes();
|
||||
}
|
||||
catch (CannotFindCvsRootException cannotFindCvsRootException) {
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.intellij.openapi.vcs.fileView.FileViewEnvironment;
|
||||
import com.intellij.openapi.vcs.history.VcsHistoryProvider;
|
||||
import com.intellij.openapi.vcs.update.UpdateEnvironment;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.cvsIntegration.CvsResult;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -157,6 +158,16 @@ public class CvsVcs2 extends AbstractVcs implements ProjectComponent,
|
||||
return myCvsStandardOperationsProvider.getFilesToProcessCount();
|
||||
}
|
||||
|
||||
public static void executeOperation(String title, CvsOperation operation, final Project project) throws VcsException {
|
||||
CvsOperationExecutor executor = new CvsOperationExecutor(project);
|
||||
executor.performActionSync(new CommandCvsHandler(title, operation),
|
||||
CvsOperationExecutorCallback.EMPTY);
|
||||
CvsResult result = executor.getResult();
|
||||
if (!result.hasNoErrors()){
|
||||
throw result.composeError();
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyFileStatusProvider implements FileStatusProvider {
|
||||
public FileStatus getStatus(VirtualFile virtualFile) {
|
||||
return CvsStatusProvider.getStatus(virtualFile);
|
||||
|
||||
Reference in New Issue
Block a user