Package org.tmatesoft.svn.core.io

Examples of org.tmatesoft.svn.core.io.SVNRepository


                myTimer = ourTimer;
                myTimer.schedule(new TimeoutTask(), 10000);
            }
        }
       
        SVNRepository repos = null;
        Map pool = getPool();
        if (!mayReuse || pool == null) {           
            repos = SVNRepositoryFactory.create(url, this);
            repos.setAuthenticationManager(myAuthManager);
            repos.setTunnelProvider(myTunnelProvider);
            repos.setDebugLog(myDebugLog);
            repos.setCanceller(myCanceller);
            return repos;
        }
       
        repos = (SVNRepository) pool.get(url.getProtocol());
        if (repos != null) {
            repos.setLocation(url, false);
        } else {
            repos = SVNRepositoryFactory.create(url, this);
            // add listener.
            if (myIsKeepConnection) {
                repos.addConnectionListener(this);
            }
            pool.put(url.getProtocol(), repos);
        }        
        repos.setAuthenticationManager(myAuthManager);
        repos.setTunnelProvider(myTunnelProvider);
        repos.setDebugLog(myDebugLog);
        repos.setCanceller(myCanceller);
        return repos;
    }
View Full Code Here


    public void setAuthenticationManager(ISVNAuthenticationManager authManager) {
        myAuthManager = authManager;
        Map pool = getPool();
        for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) {
            String key = (String) protocols.next();
            SVNRepository repository = (SVNRepository) pool.get(key);
            repository.setAuthenticationManager(myAuthManager);
        }
    }
View Full Code Here

        }
       
        Map pool = getPool();
        for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) {
            String key = (String) protocols.next();
            SVNRepository repository = (SVNRepository) pool.get(key);
            repository.closeSession();
        }
        myPool = null;

        synchronized (DefaultSVNRepositoryPool.class) {
            ourInstanceCount--;
View Full Code Here

    public void setCanceller(ISVNCanceller canceller) {
        myCanceller = canceller;
        Map pool = getPool();
        for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) {
            String key = (String) protocols.next();
            SVNRepository repository = (SVNRepository) pool.get(key);
            repository.setCanceller(canceller);
        }
    }
View Full Code Here

    public void setDebugLog(ISVNDebugLog log) {
        myDebugLog = log == null ? SVNDebugLog.getDefaultLog() : log;
        Map pool = getPool();
        for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) {
            String key = (String) protocols.next();
            SVNRepository repository = (SVNRepository) pool.get(key);
            repository.setDebugLog(myDebugLog);
        }
    }
View Full Code Here

            boolean scheduled = false;
            try {
                long currentTime = System.currentTimeMillis();
                synchronized (myInactiveRepositories) {
                    for (Iterator repositories = myInactiveRepositories.keySet().iterator(); repositories.hasNext();) {
                        SVNRepository repos = (SVNRepository) repositories.next();
                        long time = ((Long) myInactiveRepositories.get(repos)).longValue();
                        if (currentTime - time >= getTimeout()) {
                            repositories.remove();
                            repos.closeSession();
                        }
                    }
                    if (myTimer != null) {
                        myTimer.schedule(new TimeoutTask(), 10000);
                        scheduled = true;
View Full Code Here

     */
    public SVNRepository createRepository(SVNURL url, boolean mayReuse) throws SVNException {
        if (myRepositoryPool != null) {
            return myRepositoryPool.createRepository(url, mayReuse);
        }
        SVNRepository repository = SVNRepositoryFactory.create(url);
        repository.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager());
        repository.setDebugLog(getDebugLog());
        return repository;
    }
View Full Code Here

        SVNMergeRangeList remainingRangeList = null;
        if (isHonorMergeInfo()) {
            MergePath mergeTarget = new MergePath();
            Map targetMergeInfo;
            Map implicitMergeInfo;
            SVNRepository repository = getRepository(entry.getSVNURL());
            SVNURL sourceRoot = repository.getRepositoryRoot(true);
            boolean[] indirect = {false};

            Map[] fullMergeInfo = getFullMergeInfo(entry, indirect, SVNMergeInfoInheritance.INHERITED,
                    repository, file, Math.max(myRevision1, myRevision2), Math.min(myRevision1, myRevision2));
            targetMergeInfo = fullMergeInfo[0];
View Full Code Here

        super.checkCancelled();
    }

    protected SVNLocationEntry getCopySource(File path, SVNURL url, SVNRevision revision) throws SVNException {
        long[] pegRev = { SVNRepository.INVALID_REVISION };
        SVNRepository repos = createRepository(url, path, null, revision, revision, pegRev);
        SVNLocationEntry copyFromEntry = null;
        String targetPath = getPathRelativeToRoot(path, url, null, null, repos);
        CopyFromReceiver receiver = new CopyFromReceiver(targetPath);
            try {
                repos.log(new String[] { "" }, pegRev[0], 1, true, true, 0, false, new String[0], receiver);
                copyFromEntry = receiver.getCopyFromLocation();
            } catch (SVNException e) {
                SVNErrorCode errCode = e.getErrorMessage().getErrorCode();
                if (errCode == SVNErrorCode.FS_NOT_FOUND || errCode == SVNErrorCode.RA_DAV_REQUEST_FAILED) {
                    return new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);
View Full Code Here

        try {
            SVNAdminArea adminArea = wcAccess.probeOpen(path, false, 0);
            SVNEntry entry = wcAccess.getVersionedEntry(path, false);
            long revNum[] = { SVNRepository.INVALID_REVISION };
            SVNURL url = getEntryLocation(path, entry, revNum, SVNRevision.WORKING);
            SVNRepository repository = null;
            try {
                repository = createRepository(url, null, null, false);
                repository.assertServerIsMergeInfoCapable(path.toString());
            } finally {
                repository.closeSession();
            }
           
            SVNURL reposRoot = getReposRoot(path, null, pegRevision, adminArea, wcAccess);
            if (repositoryRoot != null && repositoryRoot.length > 0) {
                repositoryRoot[0] = reposRoot;
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.io.SVNRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.