Examples of ScmFileSet


Examples of org.apache.maven.scm.ScmFileSet

    protected String getRepositoryURL( File path )
        throws ScmException
    {
        // Note: I need to supply just 1 absolute path, but ScmFileSet won't let me without
        // a basedir (which isn't used here anyway), so use a dummy file.
        InfoScmResult result = info( null, new ScmFileSet( new File( "" ), path ), null );

        if ( result.getInfoItems().size() != 1 )
        {
            throw new ScmRepositoryException(
                "Cannot find URL: " + ( result.getInfoItems().size() == 0 ? "no" : "multiple" )
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

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

            return;
        }

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

        if ( !result.isSuccess() )
        {
            showError( result );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

        }

        String message = "";

        CheckInScmResult result =
            scmManager.checkIn( scmRepository, new ScmFileSet( workingDirectory ), version, message );

        if ( !result.isSuccess() )
        {
            showError( result );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

    {
        String branch = "test-branch";

        @SuppressWarnings( "deprecation" ) BranchScmResult branchResult =
            getScmManager().getProviderByUrl( getScmUrl() ).branch( getScmRepository(),
                                                                    new ScmFileSet( getWorkingCopy() ), branch );

        assertResultIsSuccess( branchResult );

        assertEquals( "check all 4 files branched", 4, branchResult.getBranchedFiles().size() );

        File readmeTxt = new File( getWorkingCopy(), "readme.txt" );

        assertEquals( "check readme.txt contents", "/readme.txt", FileUtils.fileRead( readmeTxt ) );

        changeReadmeTxt( readmeTxt );

        CheckInScmResult checkinResult =
            getScmManager().checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy() ), "commit message" );

        assertResultIsSuccess( checkinResult );

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

        assertResultIsSuccess( checkoutResult );

        readmeTxt = new File( getAssertionCopy(), "readme.txt" );

        assertEquals( "check readme.txt contents", "changed file", FileUtils.fileRead( readmeTxt ) );

        FileUtils.deleteDirectory( getAssertionCopy() );

        assertFalse( "check previous assertion copy deleted", getAssertionCopy().exists() );

        checkoutResult = getScmManager().getProviderByUrl( getScmUrl() ).checkOut( getScmRepository(),
                                                                                   new ScmFileSet( getAssertionCopy() ),
                                                                                   new ScmBranch( branch ) );

        assertResultIsSuccess( checkoutResult );

        assertEquals( "check readme.txt contents is from branched version", "/readme.txt",
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

                + "'." );

            return;
        }

        UpdateScmResult result = scmManager.update( scmRepository, new ScmFileSet( workingDirectory ), version );

        if ( !result.isSuccess() )
        {
            showError( result );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

     */
    public ChangeLogScmResult changeLog( ChangeLogScmRequest request )
        throws ScmException
    {
        final ScmRepository scmRepository = request.getScmRepository();
        final ScmFileSet scmFileSet = request.getScmFileSet();
        login( scmRepository, scmFileSet );
        return changelog( scmRepository.getProviderRepository(), scmFileSet, request.getCommandParameters() );
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

{

    protected void commit( File workingDirectory, ScmRepository repository )
        throws Exception
    {
        CheckInScmResult result = getScmManager().checkIn( repository, new ScmFileSet( workingDirectory ), "No msg" );

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

        List<ScmFile> committedFiles = result.getCheckedInFiles();
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

        // /pom.xml is modified
        // check that readme and project.xml are not updated/created
        // ----------------------------------------------------------------------

        StatusScmResult result = scmManager.getProviderByUrl( getScmUrl() )
            .status( repository, new ScmFileSet( getUpdatingCopy() ) );

        assertNotNull( "The command returned a null result.", result );

        assertResultIsSuccess( result );
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

{

    private void commit( File workingDirectory, ScmRepository repository )
        throws Exception
    {
        CheckInScmResult result = getScmManager().checkIn( repository, new ScmFileSet( workingDirectory ), "No msg" );

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

        List<ScmFile> committedFiles = result.getCheckedInFiles();
View Full Code Here

Examples of org.apache.maven.scm.ScmFileSet

       
        // ----------------------------------------------------------------------
        // Update the project
        // ----------------------------------------------------------------------
      
        UpdateScmResult result = scmManager.update( repository, new ScmFileSet( getUpdatingCopy() ), lastUpdate );

        assertNotNull( "The command returned a null result.", result );

        assertResultIsSuccess( result );
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.