use of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory in project intellij-community by JetBrains.
the class SvnKitAdminAreaFactorySelector method factoriesFor15.
private static Collection<SVNAdminAreaFactory> factoriesFor15(final Collection factories) {
final Collection<SVNAdminAreaFactory> result = new ArrayList<>(2);
for (Object item : factories) {
final SVNAdminAreaFactory factory = (SVNAdminAreaFactory) item;
final int supportedVersion = factory.getSupportedVersion();
if ((WorkingCopyFormat.ONE_DOT_FOUR.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_THREE.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_FIVE.getFormat() == supportedVersion)) {
result.add(factory);
}
}
return result;
}
use of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory in project intellij-community by JetBrains.
the class SvnKitAdminAreaFactorySelector method factoriesFor14.
private static Collection<SVNAdminAreaFactory> factoriesFor14(final Collection factories) {
final Collection<SVNAdminAreaFactory> result = new ArrayList<>(2);
for (Object item : factories) {
final SVNAdminAreaFactory factory = (SVNAdminAreaFactory) item;
final int supportedVersion = factory.getSupportedVersion();
if ((WorkingCopyFormat.ONE_DOT_FOUR.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_THREE.getFormat() == supportedVersion)) {
result.add(factory);
}
}
return result;
}
use of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory in project intellij-community by JetBrains.
the class SvnKitAdminAreaFactorySelector method factoriesFor16.
private static Collection<SVNAdminAreaFactory> factoriesFor16(final Collection factories) {
final Collection<SVNAdminAreaFactory> result = new ArrayList<>(2);
for (Object item : factories) {
final SVNAdminAreaFactory factory = (SVNAdminAreaFactory) item;
final int supportedVersion = factory.getSupportedVersion();
if ((WorkingCopyFormat.ONE_DOT_FOUR.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_THREE.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_FIVE.getFormat() == supportedVersion) || (WorkingCopyFormat.ONE_DOT_SIX.getFormat() == supportedVersion)) {
result.add(factory);
}
}
return result;
}
use of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory in project intellij-community by JetBrains.
the class SvnKitAdminAreaFactorySelector method factoriesFor13.
private static Collection<SVNAdminAreaFactory> factoriesFor13(final Collection factories) {
for (Object item : factories) {
final SVNAdminAreaFactory factory = (SVNAdminAreaFactory) item;
final int supportedVersion = factory.getSupportedVersion();
if (WorkingCopyFormat.ONE_DOT_THREE.getFormat() == supportedVersion) {
return Collections.singletonList(factory);
}
}
return Collections.emptyList();
}
use of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory in project oxTrust by GluuFederation.
the class SubversionService method initSubversionService.
/*
* Initialize singleton instance during startup
*/
public void initSubversionService() {
String svnConfigurationStoreRoot = null;
if (appConfiguration.isPersistSVN()) {
svnConfigurationStoreRoot = appConfiguration.getSvnConfigurationStoreRoot();
}
SVNAdminAreaFactory.setSelector(new ISVNAdminAreaFactorySelector() {
@SuppressWarnings({ "unchecked", "rawtypes" })
public Collection getEnabledFactories(File path, Collection factories, boolean writeAccess) throws SVNException {
Collection enabledFactories = new TreeSet();
for (Iterator factoriesIter = factories.iterator(); factoriesIter.hasNext(); ) {
SVNAdminAreaFactory factory = (SVNAdminAreaFactory) factoriesIter.next();
int version = factory.getSupportedVersion();
if (version == SVNAdminAreaFactory.WC_FORMAT_16) {
enabledFactories.add(factory);
}
}
return enabledFactories;
}
});
if (StringHelper.isEmpty(svnConfigurationStoreRoot)) {
log.warn("The service which commit configuration files into SVN was disabled");
return;
}
SvnHelper.setupLibrary(svnConfigurationStoreRoot);
}
Aggregations