Package org.tmatesoft.svn.core.wc2

Examples of org.tmatesoft.svn.core.wc2.SvnOperationFactory


                    SubversionUpdateEventHandler eventHandler = new SubversionUpdateEventHandler(new PrintStream(pos), externals, local, location.getLocalDir());
                    svnuc.setEventHandler(eventHandler);
                    svnuc.setExternalsHandler(eventHandler);
                    svnuc.setIgnoreExternals(location.isIgnoreExternalsOption());
                    SVNDepth svnDepth = getSvnDepth(location.getDepthOption());
                    SvnCheckout checkout = svnuc.getOperationsFactory().createCheckout();
                    checkout.setSource(SvnTarget.fromURL(location.getSVNURL(), SVNRevision.HEAD));
                    checkout.setSingleTarget(SvnTarget.fromFile(local.getCanonicalFile()));
                    checkout.setDepth(svnDepth);
                    checkout.setRevision(r);
                    checkout.setAllowUnversionedObstructions(true);
                    checkout.setIgnoreExternals(location.isIgnoreExternalsOption());
                    checkout.setExternalsHandler(SvnCodec.externalsHandler(svnuc.getExternalsHandler()));

                    // Workaround for SVNKIT-430 is to set the working copy format when
                    // a checkout is performed.
                    checkout.setTargetWorkingCopyFormat(SubversionWorkspaceSelector.workspaceFormat);
                    checkout.run();
                } catch (SVNCancelException e) {
                    if (isAuthenticationFailedError(e)) {
                        e.printStackTrace(listener.error("Failed to check out " + location.remote));
                        return null;
                    } else {
View Full Code Here


        statusOperation.run();
    }

    private void fillInfo( Entry entry, SvnOperationFactory operationFactory, StatusHandler statusHandler ) throws SVNException {
        if ( statusHandler.repositoryPath == null || statusHandler.repositoryPath.length() == 0 ) {
            SvnGetInfo infoOperation = operationFactory.createGetInfo();
            infoOperation.setSingleTarget( SvnTarget.fromFile( entry.getPath() ) );
            SvnInfo infoResult = infoOperation.run();
            statusHandler.repositoryRoot = infoResult.getRepositoryRootUrl().toString();
            statusHandler.repositoryPath = infoResult.getUrl().toString().substring( statusHandler.repositoryRoot.length() + 1 );
        }
    }
View Full Code Here

        setProjectProperties( entry.getPrefix(), statusHandler.createProperties() );
    }


    private void fillStatus( Entry entry, SvnOperationFactory operationFactory, StatusHandler statusHandler ) throws SVNException {
        SvnGetStatus statusOperation = operationFactory.createGetStatus();
        statusOperation.setSingleTarget( SvnTarget.fromFile( entry.getPath() ) );
        statusOperation.setDepth( SVNDepth.fromString( entry.getDepth() ) );
        statusOperation.setRevision( SVNRevision.WORKING );
        statusOperation.setReportAll( true );
        statusOperation.setReportIgnored( entry.reportIgnored() );
        statusOperation.setRemote( entry.reportOutOfDate() );
        statusOperation.setReceiver( statusHandler );
        statusOperation.run();
    }
View Full Code Here

    private void fillInfo( Entry entry, SvnOperationFactory operationFactory, StatusHandler statusHandler ) throws SVNException {
        if ( statusHandler.repositoryPath == null || statusHandler.repositoryPath.length() == 0 ) {
            SvnGetInfo infoOperation = operationFactory.createGetInfo();
            infoOperation.setSingleTarget( SvnTarget.fromFile( entry.getPath() ) );
            SvnInfo infoResult = infoOperation.run();
            statusHandler.repositoryRoot = infoResult.getRepositoryRootUrl().toString();
            statusHandler.repositoryPath = infoResult.getUrl().toString().substring( statusHandler.repositoryRoot.length() + 1 );
        }
    }
View Full Code Here

            entries = new Entry[] {
                    new Entry( project.getBasedir(), project.getArtifactId() ),
            };
        }

        SvnOperationFactory operationFactory = new SvnOperationFactory();
        try {
            for ( Entry entry : entries ) {
                if ( entry.getPath() == null ) {
                    entry.setPath( project.getBasedir() );
                }
                if ( entry.getPrefix() == null ) {
                    entry.setPrefix( project.getArtifactId() );
                }
                processEntry( operationFactory, entry );
            }
        } finally {
            operationFactory.dispose();
        }
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.wc2.SvnOperationFactory

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.