Package org.apache.maven.scm.provider.git.gitexe.command.diff

Examples of org.apache.maven.scm.provider.git.gitexe.command.diff.GitDiffRawConsumer


            return new UpdateScmResult( cl.toString(), "The git-pull command failed.",
                                        stderr.getOutput(), false );
        }

        // we also need to log exactly what has been updated
        GitDiffRawConsumer diffRawConsumer = new GitDiffRawConsumer( getLogger() );
        Commandline clDiffRaw = GitDiffCommand.createDiffRawCommandLine( fileSet.getBasedir(), origSha1 );
        exitCode = GitCommandLineUtils.execute( clDiffRaw, diffRawConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clDiffRaw.toString(), "The git-diff --raw command failed.",
                    stderr.getOutput(), false );
        }

       
        // now let's get the latest version
        consumerRev = new GitLatestRevisionCommandConsumer( getLogger() );
        exitCode = GitCommandLineUtils.execute( clRev, consumerRev, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clRev.toString(), "The git-log command failed.",
                                        stderr.getOutput(), false );
        }
        String latestRevision = consumerRev.getLatestRevision();
       
        return new UpdateScmResultWithRevision( cl.toString(), diffRawConsumer.getChangedFiles(), latestRevision );
    }
View Full Code Here


            return new UpdateScmResult( cl.toString(), "The git-pull command failed.",
                                        stderr.getOutput(), false );
        }

        // we also need to log exactly what has been updated
        GitDiffRawConsumer diffRawConsumer = new GitDiffRawConsumer( getLogger() );
        Commandline clDiffRaw = GitDiffCommand.createDiffRawCommandLine( fileSet.getBasedir(), origSha1 );
        exitCode = GitCommandLineUtils.execute( clDiffRaw, diffRawConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clDiffRaw.toString(), "The git-diff --raw command failed.",
                    stderr.getOutput(), false );
        }

       
        // now let's get the latest version
        consumerRev = new GitLatestRevisionCommandConsumer( getLogger() );
        exitCode = GitCommandLineUtils.execute( clRev, consumerRev, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clRev.toString(), "The git-log command failed.",
                                        stderr.getOutput(), false );
        }
        String latestRevision = consumerRev.getLatestRevision();
       
        return new UpdateScmResultWithRevision( cl.toString(), diffRawConsumer.getChangedFiles(), latestRevision );
    }
View Full Code Here

            return new UpdateScmResult( cl.toString(), "The git-pull command failed.",
                                        stderr.getOutput(), false );
        }

        // we also need to log exactly what has been updated
        GitDiffRawConsumer diffRawConsumer = new GitDiffRawConsumer( getLogger() );
        Commandline clDiffRaw = GitDiffCommand.createDiffRawCommandLine( fileSet.getBasedir(), origSha1 );
        exitCode = GitCommandLineUtils.execute( clDiffRaw, diffRawConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clDiffRaw.toString(), "The git-diff --raw command failed.",
                    stderr.getOutput(), false );
        }

       
        // now let's get the latest version
        consumerRev = new GitLatestRevisionCommandConsumer( getLogger() );
        exitCode = GitCommandLineUtils.execute( clRev, consumerRev, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new UpdateScmResult( clRev.toString(), "The git-log command failed.",
                                        stderr.getOutput(), false );
        }
        String latestRevision = consumerRev.getLatestRevision();
       
        return new UpdateScmResultWithRevision( cl.toString(), diffRawConsumer.getChangedFiles(), latestRevision );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.git.gitexe.command.diff.GitDiffRawConsumer

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.