Examples of CheckOutScmResult


Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

        assertEquals( ScmFileStatus.CHECKED_IN, file1.getStatus() );

        assertPath( "/test-repo/check-in/Foo.java", file1.getPath() );

        CheckOutScmResult checkoutResult =
            getScmManager().checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy() ) );

        assertResultIsSuccess( checkoutResult );

        fooJava = new File( getAssertionCopy(), "src/main/java/Foo.java" );
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

            throw new ScmException( "Error while executing command.", ex );
        }

        if ( exitCode != 0 )
        {
            return new CheckOutScmResult( cl.toString(), "The svn command failed.", stderr.getOutput(), false );
        }

        return new CheckOutScmResult( cl.toString(), Integer.toString( consumer.getRevision() ),
                                      consumer.getCheckedOutFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

    public void testCheckOutCommandTest()
        throws Exception
    {
        FileUtils.deleteDirectory( getWorkingCopy() );

        CheckOutScmResult result = checkOut( getWorkingCopy(), getScmRepository() );

        assertResultIsSuccess( result );

        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();

        if ( checkedOutFiles.size() != 4 )
        {
            SortedSet<ScmFile> files = new TreeSet<ScmFile>( checkedOutFiles );
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

     * Convenience method to check out files from the repository
     */
    protected CheckOutScmResult checkOut( File workingDirectory, ScmRepository repository )
        throws Exception
    {
        CheckOutScmResult result =
            getScmManager().getProviderByUrl( getScmUrl() ).checkOut( repository, new ScmFileSet( workingDirectory ),
                                                                      (ScmVersion) null );

        assertTrue( "Check result was successful, output: " + result.getCommandOutput(), result.isSuccess() );

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

        {

            ExportScmResult result = export( repository, fileSet, parameters );
            if ( result.isSuccess() )
            {
                return new CheckOutScmResult( result.getCommandLine(), result.getExportedFiles(),
                                              accuRevRepo.getExportRelativePath() );
            }
            else
            {
                return new CheckOutScmResult( result.getCommandLine(), result.getProviderMessage(),
                                              result.getCommandOutput(), false );
            }
        }

        AccuRevCheckOutCommand command = new AccuRevCheckOutCommand( getLogger() );
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

            {
                getLogger().debug( "VSS returns error: [" + error + "] return code: [" + exitCode + "]" );
            }
            if ( error.indexOf( "A writable copy of" ) < 0 )
            {
                return new CheckOutScmResult( cl.toString(), "The vss command failed.", error, false );
            }
            // print out the writable copy for manual handling
            if ( getLogger().isWarnEnabled() )
            {
                getLogger().warn( error );
            }
        }

        return new CheckOutScmResult( cl.toString(), consumer.getUpdatedFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

            return;
        }

        ScmManager scmManager = getScmManager();

        CheckOutScmResult result = scmManager.checkOut( getScmRepository(), getScmFileSet() );

        if ( !result.isSuccess() )
        {
            fail( result.getProviderMessage() + "\n" + result.getCommandOutput() + "\n" + result.getCommandLine() );
        }

        List<ScmFile> files = result.getCheckedOutFiles();

        assertNotNull( files );

        assertEquals( 3, files.size() );
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

            return;
        }

        ScmManager scmManager = getScmManager();

        @SuppressWarnings( "deprecation" )
        CheckOutScmResult result = scmManager.getProviderByRepository( getScmRepository() ).checkOut(
            getScmRepository(), getScmFileSet(), "MAVEN_1_0" );

        if ( !result.isSuccess() )
        {
            fail( result.getProviderMessage() + "\n" + result.getCommandOutput() );
        }

        List<ScmFile> files = result.getCheckedOutFiles();

        assertNotNull( files );

        assertEquals( 1, files.size() );
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

                "Error while making the working directory: '" + workingDirectory.getAbsolutePath() + "'." );

            return;
        }

        CheckOutScmResult result = scmManager.checkOut( scmRepository, new ScmFileSet( workingDirectory ), version );

        if ( !result.isSuccess() )
        {
            showError( result );

            return;
        }

        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();

        System.out.println( "Checked out these files: " );

        for ( ScmFile file : checkedOutFiles )
        {
View Full Code Here

Examples of org.apache.maven.scm.command.checkout.CheckOutScmResult

        int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

        if ( exitCode != 0 )
        {
            return new CheckOutScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(), false );
        }

        return new CheckOutScmResult( cl.toString(), consumer.getCheckedOutFiles() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.