Package org.apache.maven.scm

Examples of org.apache.maven.scm.ChangeFile


            tmpLine = line.substring( FILES_TOKEN.length() ).trim();
            String[] files = tmpLine.split( " " );
            for ( int i = 0; i < files.length; i++ )
            {
                String file = files[i];
                ChangeFile changeFile = new ChangeFile( file, currentRevision );
                currentChange.addFile( changeFile );
            }
        }
        else if ( line.length() > 0 )
        {
View Full Code Here


                    String comment = cpid + ": " + revisionItem.getField( "cpsummary" ).getValueAsString();
                    // Get the date associated with this revision
                    Date date = revisionItem.getField( "date" ).getDateTime();

                    // Lets create our ChangeFile based on the information we've gathered so far
                    ChangeFile changeFile = new ChangeFile( memberName, revision );

                    // Check to see if we already have a ChangeSet grouping for this revision
                    ChangeSet changeSet = changeSetHash.get( cpid );
                    if ( null != changeSet )
                    {
View Full Code Here

    private void processGetFile( String line )
    {
        if ( line.startsWith( START_FILE ) )
        {
            setCurrentChange( new ChangeSet() );
            setCurrentFile( new ChangeFile( line.substring( START_FILE.length(), line.length() ) ) );
            setStatus( GET_REVISION );
        }
    }
View Full Code Here

            // add entry, and set state to get revision
            addEntry( getCurrentChange(), getCurrentFile() );
            // new change log entry
            setCurrentChange( new ChangeSet() );
            // same file name, but different rev
            setCurrentFile( new ChangeFile( getCurrentFile().getName() ) );
            setStatus( GET_REVISION );
        }
        else if ( line.startsWith( END_FILE ) )
        {
            addEntry( getCurrentChange(), getCurrentFile() );
View Full Code Here

        ChangeSet cs = (ChangeSet) changeSets.get( 0 );
        assertThat( cs.getAuthor(), is( "aUser" ) );
        assertThat( cs.getComment(), is( "a Comment" ) );
        assertThat( cs.getDate(), is( keepWhen ) );
        assertThat( cs.getFiles().size(), is( 1 ) );
        ChangeFile cf = (ChangeFile) cs.getFiles().get( 0 );

        assertThat( cf.getName(), is( "/./kept/file" ) );
        assertThat( cf.getRevision(), is( "10/5 (5/5)" ) );

        cs = (ChangeSet) changeSets.get( 2 );
        assertThat( cs.getAuthor(), is( "various" ) );
        // created/removed/moved but not the file that was in the promoted
        // set...
View Full Code Here

            assertThat( changeSet.getComment(), isOneOf( "Upstream changes", "WS7toS4", "keepWS5" ) );

            if ( "Upstream changes".equals( changeSet.getComment() ) )
            {
                assertThat( changeSet.getFiles().size(), is( 1 ) );
                ChangeFile changeFile = (ChangeFile) changeSet.getFiles().get( 0 );
                assertThat( changeFile, is( changeFile( "/promoted/WS3toS2" ) ) );
            }
        }
    }
View Full Code Here

     */
    private void processGetComment( String line )
    {
        if ( line.equals( COMMENT_DELIMITER ) )
        {
            addEntry( currentChange, new ChangeFile( currentFile, revisionRegexp.getParen( 1 ) ) );

            status = GET_REVISION;
        }
        else
        {
View Full Code Here

        addFile( new ScmFile( file, status ) );
       
        List<ChangeFile>
        changeFiles =
            Arrays.asList( new ChangeFile[] { new ChangeFile( line, Integer.valueOf( revision ).toString() ) } );

        ChangeSet changeSet = new ChangeSet( null, null, null, changeFiles );
        changeSets.add( changeSet );
    }
View Full Code Here

            else
            {
                action = ScmFileStatus.UNKNOWN;
            }
            System.out.println( actionStr + " : " + name );
            final ChangeFile changeFile = new ChangeFile( name, currentRevision );
            changeFile.setAction( action );
            changeFile.setOriginalName( originalName );
            changeFile.setOriginalRevision( originalRev );
            currentChange.addFile( changeFile );

            status = GET_FILE;
        }
        else if ( line.equals( FILE_END_TOKEN ) )
View Full Code Here

                String author = "";
                List<ScmFile> files = result.getUpdatedFiles();
                List<ChangeFile> changeFiles = new ArrayList<ChangeFile>( files.size() );
                for (ScmFile scmFile : files)
                {
                    changeFiles.add(new ChangeFile( scmFile.getPath() ));
                }
                ChangeSet dummyChangeSet = new ChangeSet( new Date(), comment, author, changeFiles );
                // different streams invalidates the change log, insert a dummy change instead.
                List<ChangeSet> changeSets = Collections.singletonList( dummyChangeSet );
                result.setChanges( changeSets );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ChangeFile

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.