Package org.apache.maven.scm

Examples of org.apache.maven.scm.ChangeSet


            s = in.readLine();
        }

        Collection<ChangeSet> entries = command.getModifications();
        assertEquals( "Wrong number of entries returned", 3, entries.size() );
        ChangeSet entry = null;
        for ( Iterator<ChangeSet> i = entries.iterator(); i.hasNext(); )
        {
            entry = i.next();
            assertTrue( "ChangeLogEntry erroneously picked up",
                        entry.toString().indexOf( "ChangeLogEntry.java" ) == -1 );
        }
    }
View Full Code Here


     *
     * @param line a line of text from the VSS log output
     */
    private void processGetFile( String line )
    {
        currentChangeSet = ( new ChangeSet() );
        String[] fileLine = line.split( " " );
        currentFile = new ChangeFile( fileLine[2] );
    }
View Full Code Here

            entry.addFile( file );
            entries.put( key, entry );
        }
        else
        {
            ChangeSet existingEntry = (ChangeSet) entries.get( key );
            existingEntry.addFile( file );
        }
    }
View Full Code Here

        throws Exception
    {
        List<ChangeSet> entries = parseTestFile();

        // ensure the filename in the first ChangeSet has correct relative path
        ChangeSet entry = (ChangeSet) entries.get( 1 );

        assertTrue( entry.containsFilename( "./maven/src/File2.java" ));
    }
View Full Code Here

        }

        List<ChangeSet> mods = consumer.getModifications();
        assertEquals( 4, mods.size() );

        final ChangeSet ch2 = mods.get( 2 );
        Assert.assertEquals( "Unexpected committer", "tsmoergrav@slb.com", ch2.getAuthor() );
        Assert.assertEquals( "Unexpected comment", "Second", ch2.getComment() );
        Assert.assertEquals( "File count", 2, ch2.getFiles().size() );

        final ChangeFile ch2f1 = ch2.getFiles().get( 0 );
        Assert.assertEquals( "Invalid action", ScmFileStatus.MODIFIED, ch2f1.getAction() );
        Assert.assertEquals( "Invalid  file name", "changeLogWithMerge.txt", ch2f1.getName() );
        Assert.assertNull( "Unexpected originalName", ch2f1.getOriginalName() );

        final ChangeFile ch2f2 = ch2.getFiles().get( 1 );
        Assert.assertEquals( "Invalid action", ScmFileStatus.RENAMED, ch2f2.getAction() );
        Assert.assertEquals( "Invalid file name", "blablabla.txt", ch2f2.getName() );
        Assert.assertEquals( "Invalid original name", "a", ch2f2.getOriginalName() );
    }
View Full Code Here

                File repoFile = new File( repoRoot, path );

                file = new File( baseDestination, path );

                ChangeSet changeSet = new ChangeSet();

                int chop = repoRoot.getAbsolutePath().length();

                String fileName = "/" + repoFile.getAbsolutePath().substring( chop + 1 );

                changeSet.addFile( new ChangeFile( fileName, null ) );

                if ( repoFile.exists() )
                {
                    long lastModified = repoFile.lastModified();

                    Date modifiedDate = new Date( lastModified );

                    if ( startDate != null )
                    {
                        if ( startDate.before( modifiedDate ) || startDate.equals( modifiedDate ) )
                        {
                            if ( endDate != null )
                            {
                                if ( endDate.after( modifiedDate ) || endDate.equals( modifiedDate ) )
                                {
                                    // nop
                                }
                                else
                                {
                                    continue;
                                }
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }

                    changeSet.setDate( modifiedDate );

                    changeLogList.add( changeSet );
                }
                else
                {
View Full Code Here

     */
    private void processGetFile( String line )
    {
        if ( line.startsWith( START_FILE ) )
        {
            setCurrentChange( new ChangeSet() );

            setCurrentFile(
                new ChangeFile( this.currentDir + "/" + 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 );
View Full Code Here

            s = in.readLine();
        }

        List<ChangeSet> entries = new ArrayList<ChangeSet>( consumer.getModifications() );
        assertEquals( "Wrong number of entries returned", 7, entries.size() );
        ChangeSet entry = entries.get(0);
        assertEquals( "mcronin", entry.getAuthor() );
        assertEquals( "Wrong number of files returned", 3, entry.getFiles().size() );
        assertEquals( "demo/demo.c", ( (ChangeFile) entry.getFiles().get( 0 ) ).getName() );
        assertEquals( "2003-08-07", entry.getDateFormatted() );
        assertEquals( "17:21:57", entry.getTimeFormatted() );
        entry = entries.get(6);
        assertEquals( "jim", entry.getAuthor() );
        assertEquals( "Wrong number of files returned", 1, entry.getFiles().size() );
        assertEquals( "junk/linefeed.txt", ( (ChangeFile) entry.getFiles().get( 0 ) ).getName() );
    }
View Full Code Here

    {
        super.consumeLine( line );
        if ( changeSetRegExp.match( line ) )
        {
            String changesetAlias = changeSetRegExp.getParen( 1 );
            ChangeSet changeSet = new ChangeSet();
            changeSet.setRevision( changesetAlias );

            entries.add( changeSet );
        }
    }
View Full Code Here

TOP

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

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.