Package org.apache.maven.scm

Examples of org.apache.maven.scm.ChangeFile


     */
    private void processGetFile( String line )
    {
        currentChangeSet = ( new ChangeSet() );
        String[] fileLine = line.split( " " );
        currentFile = new ChangeFile( fileLine[2] );
    }
View Full Code Here


        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

                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();
View Full Code Here

        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

            // 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 ) )
        {
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

        Collection<ChangeFile> entries = consumer.getFiles();

        assertEquals( "Wrong number of entries returned", 1, entries.size() );

        ChangeFile file = entries.iterator().next();
        assertEquals( "MessageResources.properties", file.getName() );
        assertEquals( "3", file.getRevision() );
    }
View Full Code Here

        assertEquals( "895d423689da3b36d8e9106c0ecbf3d62433978c", entry.getRevision() );

        assertEquals( "/ added", entry.getComment() );

        assertNotNull( entry.getFiles() );
        ChangeFile cf = entry.getFiles().get( 0 );
        assertEquals( "readme.txt", cf.getName() );
        assertTrue( cf.getRevision() != null && cf.getRevision().length() > 0 );
    }
View Full Code Here

        assertNotNull( entry.getFiles() );

        assertEquals( 10, entry.getFiles().size() );

        ChangeFile cf = entry.getFiles().get( 0 );
        assertEquals(
            "maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java",
            cf.getName() );
        assertTrue( cf.getRevision() != null && cf.getRevision().length() > 0 );
    }
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, fileRegexp.getParen( 2 ) ) );
        }
    }
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.