Examples of ChangeFile


Examples of org.apache.maven.scm.ChangeFile

                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

Examples of org.apache.maven.scm.ChangeFile

        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

Examples of org.apache.maven.scm.ChangeFile

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

Examples of org.apache.maven.scm.ChangeFile

            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

Examples of org.apache.maven.scm.ChangeFile

        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

Examples of org.apache.maven.scm.ChangeFile

        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

Examples of org.apache.maven.scm.ChangeFile

        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

Examples of org.apache.maven.scm.ChangeFile

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

Examples of org.apache.maven.scm.ChangeFile

                        getLogger().debug( "Skipping workspace to basis stream promote " + v );
                    }
                }
                else
                {
                    ChangeFile f =
                        new ChangeFile( v.getElementName(), v.getVirtualSpec() + " (" + v.getRealSpec() + ")" );
                    files.add( f );
                }

            }

            if ( versions.isEmpty() || !files.isEmpty() )
            {
                ChangeSet changeSet = new ChangeSet( t.getWhen(), t.getComment(), t.getAuthor(), files );

                entries.add( changeSet );
            }
            else
            {
                if ( getLogger().isDebugEnabled() )
                {
                    getLogger().debug( "All versions removed for " + t );
                }
            }

        }

        // Anything left in the differencesMap represents a change from a higher stream
        // We don't have details on who or where these came from, but it is important to
        // detect these for CI tools like Continuum
        if ( !differencesMap.isEmpty() )
        {
            List<ChangeFile> upstreamFiles = new ArrayList<ChangeFile>();
            for ( FileDifference difference : differencesMap.values() )
            {
                if ( difference.getNewVersionSpec() != null )
                {
                    upstreamFiles.add( new ChangeFile( difference.getNewFile().getPath(),
                                                       difference.getNewVersionSpec() ) );
                }
                else
                {
                    // difference is a deletion
                    upstreamFiles.add( new ChangeFile( difference.getOldFile().getPath(), null ) );
                }
            }
            entries.add( new ChangeSet( endDate, "Upstream changes", "various", upstreamFiles ) );
        }
View Full Code Here

Examples of org.apache.maven.scm.ChangeFile

        if ( getFiles() != null )
        {
            for ( Iterator<ChangeFile> i = getFiles().iterator(); i.hasNext(); )
            {
                ChangeFile file = i.next();

                if ( currentFile.endsWith( StringUtils.replace( file.getName(), "\\", "/" ) ) )
                {
                    return true;
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.