Package org.apache.maven.scm

Examples of org.apache.maven.scm.ChangeFile


    }

    public void testCompareByRevision()
    {
        List<ChangeFile> list1 = new ArrayList<ChangeFile>();
        list1.add( new ChangeFile( "changefile-1", "123" ) );
        list1.add( new ChangeFile( "changefile-1", "234" ) );

        List<ChangeFile> list2 = new ArrayList<ChangeFile>();
        list2.add( new ChangeFile( "changefile-2", "246" ) );
        list2.add( new ChangeFile( "changefile-2", "468" ) );

        assertTrue( "Test compare by revision, less than", comparator.compare( list1, list2 ) < 0 );

        list1 = new ArrayList<ChangeFile>();
        list1.add( new ChangeFile( "changefile-1", "246" ) );
        list1.add( new ChangeFile( "changefile-1", "468" ) );

        list2 = new ArrayList<ChangeFile>();
        list2.add( new ChangeFile( "changefile-2", "123" ) );
        list2.add( new ChangeFile( "changefile-2", "234" ) );

        assertTrue( "Test compare by revision, greater than", comparator.compare( list1, list2 ) > 0 );
    }
View Full Code Here


            ChangeSet changeSet = it.next();
            List<ChangeFile> files = changeSet.getFiles();
            Iterator<ChangeFile> iterator = files.iterator();
            while ( iterator.hasNext() )
            {
                ChangeFile changeFile = iterator.next();
                String name = changeFile.getName();
                if ( !isIncluded( includes, name ) || isExcluded( excludes, name ) )
                {
                    iterator.remove();
                }
            }
View Full Code Here

     * @param list2 the object to compare list1 against
     * @return an integer describing the order comparison of list1 and list2
     */
    private int sortByName( List<ChangeFile> list1, List<ChangeFile> list2 )
    {
        ChangeFile file1 = list1.get( 0 );

        ChangeFile file2 = list2.get( 0 );

        return file1.getName().compareTo( file2.getName() );
    }
View Full Code Here

    {
        bufData = "";

        if ( "file".equals( qName ) )
        {
            bufFile = new ChangeFile( "" );
        }
        else if ( "changelog-entry".equals( qName ) )
        {
            bufEntry = new ChangeSet();
        }
View Full Code Here

        initReportUrls();

        for ( List<ChangeFile> revision : list )
        {
            ChangeFile file = revision.get( 0 );

            sink.tableRow();
            sink.tableCell();

            try
            {
                generateLinks( getConnection(), file.getName(), sink );
            }
            catch ( Exception e )
            {
                if ( getLog().isDebugEnabled() )
                {
                    getLog().error( e.getMessage(), e );
                }
                else
                {
                    getLog().error( e.getMessage() );
                }

                sink.text( file.getName() );
            }
            sink.tableCell_();

            sink.tableCell();
            sink.text( "" + revision.size() );
View Full Code Here

            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.startsWith( MESSAGE_TOKEN ) )
        {
View Full Code Here

  // Although Perforce allows files to be submitted anywhere in the
  // repository in a single changelist, we're only concerned about the
  // local files.
        if( currentFile.startsWith( repoPath ) ) {
            currentFile = currentFile.substring( repoPath.length() + 1 );
            addEntry( currentChange, new ChangeFile( currentFile, matcher.group( 2 ) ) );
        }
    }
View Full Code Here

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

            status = GET_REVISION;
        }
        else
        {
View Full Code Here

            else
            {
                action = ScmFileStatus.UNKNOWN;
            }

            final ChangeFile changeFile = new ChangeFile( name, currentRevision );
            changeFile.setAction( action );
            changeFile.setOriginalName( originalName );
            changeFile.setOriginalRevision( originalRevision );
            currentChange.addFile( changeFile );
        }
    }
View Full Code Here

                    "    changeFlags    : " + changeFlags + " Translated to : " + parseFileChangeState( changeFlags ) );
                getLogger().debug( "    filetAlias     : " + fileAlias );
                getLogger().debug( "    file           : " + file );
            }

            ChangeFile changeFile = new ChangeFile( file );
            ScmFileStatus status = parseFileChangeState( changeFlags );
            changeFile.setAction( status );
            currentChangeSet.getFiles().add( changeFile );
        }
    }
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.