Search in sources :

Example 6 with WorkingCopyFormat

use of org.jetbrains.idea.svn.WorkingCopyFormat in project intellij-community by JetBrains.

the class SvnKitAdminAreaFactorySelector method getEnabledFactories.

public Collection getEnabledFactories(File path, Collection factories, boolean writeAccess) throws SVNException {
    if (ApplicationManager.getApplication().isUnitTestMode()) {
        return factories;
    }
    if (!writeAccess) {
        return factories;
    }
    Collection result = null;
    final WorkingCopyFormat presetFormat = SvnWorkingCopyFormatHolder.getPresetFormat();
    if (presetFormat != null) {
        result = format2Factories(presetFormat, factories);
    }
    if (result == null) {
        final WorkingCopyFormat format = SvnFormatSelector.getWorkingCopyFormat(path);
        result = format2Factories(format, factories);
    }
    if (result == null) {
        throw new SVNException(SVNErrorMessage.create(SVNErrorCode.WC_NOT_DIRECTORY));
    }
    return result;
}
Also used : WorkingCopyFormat(org.jetbrains.idea.svn.WorkingCopyFormat) Collection(java.util.Collection) SVNException(org.tmatesoft.svn.core.SVNException)

Aggregations

WorkingCopyFormat (org.jetbrains.idea.svn.WorkingCopyFormat)6 NotNull (org.jetbrains.annotations.NotNull)4 ArrayList (java.util.ArrayList)2 ClientFactory (org.jetbrains.idea.svn.api.ClientFactory)2 SVNException (org.tmatesoft.svn.core.SVNException)2 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 Task (com.intellij.openapi.progress.Task)1 Ref (com.intellij.openapi.util.Ref)1 Version (com.intellij.openapi.util.Version)1 VcsException (com.intellij.openapi.vcs.VcsException)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 Collection (java.util.Collection)1 SvnVcs (org.jetbrains.idea.svn.SvnVcs)1 ProgressTracker (org.jetbrains.idea.svn.api.ProgressTracker)1 CommandExecutor (org.jetbrains.idea.svn.commandLine.CommandExecutor)1 SvnBindException (org.jetbrains.idea.svn.commandLine.SvnBindException)1 SVNCancelException (org.tmatesoft.svn.core.SVNCancelException)1