Package org.apache.maven.scm.command.checkin

Examples of org.apache.maven.scm.command.checkin.CheckInScmResult


        // pause a couple seconds... [SCM-244]
        Thread.sleep( 2000 );

        //Make a change to the readme.txt and commit the change
        ScmTestCase.makeFile( getWorkingCopy(), "/readme.txt", "changed readme.txt" );
        CheckInScmResult checkInResult = provider.checkIn( getScmRepository(), fileSet, COMMIT_MSG );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        ChangeLogScmResult secondResult = provider.changeLog( getScmRepository(), fileSet, (ScmVersion) null, null );
        assertTrue( secondResult.getProviderMessage(), secondResult.isSuccess() );
        assertEquals( 2, secondResult.getChangeLog().getChangeSets().size() );
View Full Code Here


{

    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();

        assertEquals(
            "Expected 3 files in the committed files list:\n  " + StringUtils.join( committedFiles.iterator(), "\n  " ),
            3, committedFiles.size() );
    }
View Full Code Here

                    repository.getURI() };

                result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
            }

            return new CheckInScmResult( commitedFiles, result );
        }

        return new CheckInScmResult( commitedFiles, result );
    }
View Full Code Here

{

    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();

        assertEquals( "Expected 2 files in the committed files list " + committedFiles, 2, committedFiles.size() );
    }
View Full Code Here

        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 =
View Full Code Here

                                                      new ScmFileSet( getWorkingCopy(), "src/main/java/Foo.java",
                                                                      null ) );

        assertResultIsSuccess( addResult );

        CheckInScmResult result =
            getScmManager().checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy() ), "Commit message" );

        assertResultIsSuccess( result );

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

        assertNotNull( files );

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

                                                                                                      "src/main/java/Foo.java",
                                                                                                      null ) );

        assertResultIsSuccess( addResult );

        CheckInScmResult result =
            getScmManager().checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy(), "**/Foo.java", null ),
                                     "Commit message" );

        assertResultIsSuccess( result );

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

        assertNotNull( files );

        assertEquals( 1, files.size() );

View Full Code Here

        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 =
View Full Code Here

        Thread.sleep( 2000 );

        // Make a change to the readme.txt and commit the change
        ScmTestCase.makeFile( getWorkingCopy(), "/readme.txt", "changed readme.txt" );
        ScmTestCase.makeFile( getWorkingCopy(), "/src/test/java/Test.java", "changed Test.java" );
        CheckInScmResult checkInResult = provider.checkIn( mainRepository, fileSet, "upstream workspace promote" );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        Thread.sleep( 2000 );

        Date timeBeforeDownstreamCheckin = new Date();

        Thread.sleep( 2000 );

        ScmFileSet updateFileSet = new ScmFileSet( getUpdatingCopy() );
        provider.update( mainRepository, updateFileSet );
        ScmTestCase.makeFile( getUpdatingCopy(), "/pom.xml", "changed pom.xml" );
        ScmTestCase.makeFile( getUpdatingCopy(), "/src/test/java/Test.java", "changed again Test.java" );
        checkInResult = provider.checkIn( mainRepository, updateFileSet, "downstream workspace promote" );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        Thread.sleep( 2000 );

        Date timeBeforeDownstreamPromote = new Date();
View Full Code Here

        Date timeBeforeSecond = new Date(); // Current time
        // pause a couple seconds...
        Thread.sleep( 2000 );
        //Make a change to the readme.txt and commit the change
        ScmTestCase.makeFile( getWorkingCopy(), "/readme.txt", "changed readme.txt" );
        CheckInScmResult checkInResult = provider.checkIn( getScmRepository(), fileSet, COMMIT_MSG );
        assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess() );

        result = manager.blame( repository, fileSet, "readme.txt" );

        // pause a couple seconds...
        Thread.sleep( 2000 );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.checkin.CheckInScmResult

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.