public void init() { FSRepositoryFactory.setup(); try { myDAVConfig = new DAVConfig(getServletConfig()); } catch (SVNException e) { myDAVConfig = null; } }
private static void setupLibrary() { /* * For using over http:// and https:// */ DAVRepositoryFactory.setup(); /* * For using over svn:// and svn+xxx:// */ SVNRepositoryFactoryImpl.setup(); /* * For using over file:/// */ FSRepositoryFactory.setup(); } }
public void init() { /* * For using over http:// and https:// */ DAVRepositoryFactory.setup(); /* * For using over svn:// and svn+xxx:// */ SVNRepositoryFactoryImpl.setup(); /* * For using over file:/// */ FSRepositoryFactory.setup(); }
protected SVNClientImpl(SVNClient owner, IHTTPConnectionFactory httpConnectionFactory, ISVNConnectorFactory svnConnectorFactory) { DAVRepositoryFactory.setup(httpConnectionFactory); SVNRepositoryFactoryImpl.setup(svnConnectorFactory); FSRepositoryFactory.setup(); myConfigDir = SVNWCUtil.getDefaultConfigurationDirectory().getAbsolutePath(); myOwner = owner == null ? (SVNClientInterface) this : (SVNClientInterface) owner; synchronized (SVNClientImpl.class) { ourInstanceCount++; } }
/** * Constructor. * * @param localRepository * @param protocol * @param host * @param path * @param sshKeyFile * @param login * @param password */ public VCSSVN(File localRepository, String protocol, String host, String path, File sshKeyFile, String login, String password) { super(localRepository, protocol, host, path, sshKeyFile, login, password); if (protocol.startsWith("file")) { FSRepositoryFactory.setup(); } else if (protocol.startsWith("http")) { DAVRepositoryFactory.setup(); } else { //svn://, svn+xxx:// (svn+ssh:// in particular) SVNRepositoryFactoryImpl.setup(); } }
private static void setupLibrary() { /* * For using over http:// and https:// */ DAVRepositoryFactory.setup(); /* * For using over svn:// and svn+xxx:// */ SVNRepositoryFactoryImpl.setup(); /* * For using over file:/// */ FSRepositoryFactory.setup(); } }
protected SVNClientImpl(SVNClient owner, IHTTPConnectionFactory httpConnectionFactory, ISVNConnectorFactory svnConnectorFactory) { DAVRepositoryFactory.setup(httpConnectionFactory); SVNRepositoryFactoryImpl.setup(svnConnectorFactory); FSRepositoryFactory.setup(); myConfigDir = SVNWCUtil.getDefaultConfigurationDirectory().getAbsolutePath(); myOwner = owner == null ? (SVNClientInterface) this : (SVNClientInterface) owner; synchronized (SVNClientImpl.class) { ourInstanceCount++; } }
protected SVNClientImpl(SVNClient owner, IHTTPConnectionFactory httpConnectionFactory, ISVNConnectorFactory svnConnectorFactory) { DAVRepositoryFactory.setup(httpConnectionFactory); SVNRepositoryFactoryImpl.setup(svnConnectorFactory); FSRepositoryFactory.setup(); myConfigDir = SVNWCUtil.getDefaultConfigurationDirectory().getAbsolutePath(); myOwner = owner == null ? (SVNClientInterface) this : (SVNClientInterface) owner; }
protected SVNClientImpl(SVNClient owner, IHTTPConnectionFactory httpConnectionFactory, ISVNConnectorFactory svnConnectorFactory) { DAVRepositoryFactory.setup(httpConnectionFactory); SVNRepositoryFactoryImpl.setup(svnConnectorFactory); FSRepositoryFactory.setup(); myConfigDir = SVNWCUtil.getDefaultConfigurationDirectory().getAbsolutePath(); myOwner = owner == null ? (SVNClientInterface) this : (SVNClientInterface) owner; synchronized (SVNClientImpl.class) { ourInstanceCount++; } }
/** * Initializes the library to work with a repository either via svn:// (and * svn+ssh://) or via http:// (and https://) */ private static void initialize() { if ( initialized ) { return; } /* * for DAV (over http and https) */ DAVRepositoryFactory.setup(); /* * for svn (over svn and svn+ssh) */ SVNRepositoryFactoryImpl.setup(); /* * for file */ FSRepositoryFactory.setup(); initialized = true; }
public static SCMStatus doStatus(File baseDir) throws RuntimeException { // initialize SVNKit to work through file:/// protocol FSRepositoryFactory.setup(); SVNClientManager clientManager = SVNClientManager.newInstance(); SVNStatusClient statusClient = clientManager.getStatusClient(); Map<String, Boolean> map = new HashMap<String, Boolean>(); ISVNStatusHandler handler = new StatusHandler(baseDir, map); try { statusClient.doStatus(baseDir, SVNRevision.WORKING, SVNDepth.INFINITY, false /* remote */, true /* reportAll */, false /* includeIgnored */, false /* collectParentExternals */, handler, null); } catch (SVNException svne) { throw new RuntimeException(svne); } int counter = 0; for (Boolean b : map.values()) { if (b == Boolean.TRUE) { counter++; } } log.info("-----------------------------------------------------------------------------------------------"); log.info("PROJECT IS UNDER SVN: Files tracked by svn ({}) won't be overwritten/deleted by Celerio", counter); log.info("-----------------------------------------------------------------------------------------------"); return new SCMStatus(map); }
public static SCMStatus doStatus(File baseDir) throws RuntimeException { // initialize SVNKit to work through file:/// protocol FSRepositoryFactory.setup(); SVNClientManager clientManager = SVNClientManager.newInstance(); SVNStatusClient statusClient = clientManager.getStatusClient(); Map<String, Boolean> map = new HashMap<String, Boolean>(); ISVNStatusHandler handler = new StatusHandler(baseDir, map); try { statusClient.doStatus(baseDir, SVNRevision.WORKING, SVNDepth.INFINITY, false /* remote */, true /* reportAll */, false /* includeIgnored */, false /* collectParentExternals */, handler, null); } catch (SVNException svne) { throw new RuntimeException(svne); } int counter = 0; for (Boolean b : map.values()) { if (b == Boolean.TRUE) { counter++; } } log.info("-----------------------------------------------------------------------------------------------"); log.info("PROJECT IS UNDER SVN: Files tracked by svn ({}) won't be overwritten/deleted by Celerio", counter); log.info("-----------------------------------------------------------------------------------------------"); return new SCMStatus(map); }
/** * Constructs ... * * * @param storeFactory * @param fileSystem * @param repositoryManager */ @Inject public SvnRepositoryHandler(StoreFactory storeFactory, FileSystem fileSystem, HookEventFacade eventFacade) { super(storeFactory, fileSystem); // register logger SVNDebugLog.setDefaultLog(new SVNKitLogger()); // setup FSRepositoryFactory for SvnRepositoryBrowser FSRepositoryFactory.setup(); // register hook if (eventFacade != null) { FSHooks.registerHook(new SvnRepositoryHook(eventFacade, this)); } else if (logger.isWarnEnabled()) { logger.warn( "unable to register hook, beacause of missing repositorymanager"); } }
this.svnUrl = url; if (isFileSystemRepo) { FSRepositoryFactory.setup(); clientManagerPool = SvnObjectPools.clientManagerPool(); } else {
this.svnUrl = url; if (isFileSystemRepo) { FSRepositoryFactory.setup(); clientManagerPool = SvnObjectPools.clientManagerPool(); } else {
DAVRepositoryFactory.setup(); SVNRepositoryFactoryImpl.setup(); FSRepositoryFactory.setup(); if (svnClientMgr == null) { log.error("SVN client manager may not be null");
DAVRepositoryFactory.setup(); SVNRepositoryFactoryImpl.setup(); FSRepositoryFactory.setup(); if (svnClientMgr == null) { log.error("SVN client manager may not be null");
FSRepositoryFactory.setup();
private void deleteRepository(String repositoryName, String url, String name, String password, String commitMessage) throws SVNException { // set up some magic DAVRepositoryFactory.setup(); FSRepositoryFactory.setup(); // get the SVN repository object SVNURL svnurl = SVNURL.parseURIEncoded(url); SVNRepository repository = getRepository(svnurl); // set authentication ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); // now the real work starts // get editor - it can commit changes to svn ISVNEditor editor = repository.getCommitEditor(commitMessage, null /*locks*/, true /*keepLocks*/, null /*mediator*/); try { editor.openRoot(-1); //delete folder for repository editor.deleteEntry(repositoryName, -1); editor.closeDir(); //commit editor.closeEdit(); } finally { repository.closeSession(); } }
FSRepositoryFactory.setup();