Examples of GitStatusConsumer


Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

            // git-commit doesn't show single files, but only summary :/
            // so we must run git-status and consume the output
            // borrow a few things from the git-status command
            Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

            GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir() );
            exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                // git-status returns non-zero if nothing to do
                if ( getLogger().isInfoEnabled() )
                {
                    getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to " +
                            "track)" );
                }
            }
           
            if ( statusConsumer.getChangedFiles().isEmpty() )
            {
                return new CheckInScmResult( null, statusConsumer.getChangedFiles() );
            }

            Commandline clCommit = createCommitCommandLine( repository, fileSet, messageFile );

            exitCode = GitCommandLineUtils.execute( clCommit, stdout, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                return new CheckInScmResult( clCommit.toString(), "The git-commit command failed.", stderr.getOutput(),
                                             false );
            }

            if( repo.isPushChanges() )
            {
                Commandline cl = createPushCommandLine( getLogger(), repository, fileSet, version );

                exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    return new CheckInScmResult( cl.toString(), "The git-push command failed.", stderr.getOutput(), false );
                }               
            }

            List<ScmFile> checkedInFiles = new ArrayList<ScmFile>( statusConsumer.getChangedFiles().size() );

            // rewrite all detected files to now have status 'checked_in'
            for ( ScmFile changedFile : statusConsumer.getChangedFiles() )
            {
                ScmFile scmfile = new ScmFile( changedFile.getPath(), ScmFileStatus.CHECKED_IN );

                if ( fileSet.getFileList().isEmpty() )
                {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

            // git-commit doesn't show single files, but only summary :/
            // so we must run git-status and consume the output
            // borrow a few things from the git-status command
            Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

            GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir() );
            exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                // git-status returns non-zero if nothing to do
                if ( getLogger().isInfoEnabled() )
                {
                    getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to " +
                            "track)" );
                }
            }
           
            if ( statusConsumer.getChangedFiles().isEmpty() )
            {
                return new CheckInScmResult( null, statusConsumer.getChangedFiles() );
            }

            Commandline clCommit = createCommitCommandLine( repository, fileSet, messageFile );

            exitCode = GitCommandLineUtils.execute( clCommit, stdout, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                return new CheckInScmResult( clCommit.toString(), "The git-commit command failed.", stderr.getOutput(),
                                             false );
            }

            if( repo.isPushChanges() )
            {
                Commandline cl = createPushCommandLine( getLogger(), repository, fileSet, version );

                exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    return new CheckInScmResult( cl.toString(), "The git-push command failed.", stderr.getOutput(), false );
                }               
            }

            List<ScmFile> checkedInFiles = new ArrayList<ScmFile>( statusConsumer.getChangedFiles().size() );

            // rewrite all detected files to now have status 'checked_in'
            for ( ScmFile changedFile : statusConsumer.getChangedFiles() )
            {
                ScmFile scmfile = new ScmFile( changedFile.getPath(), ScmFileStatus.CHECKED_IN );

                if ( fileSet.getFileList().isEmpty() )
                {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

        // git-add doesn't show single files, but only summary :/
        // so we must run git-status and consume the output
        // borrow a few things from the git-status command
        Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

        GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir() );
        CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
        int exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            // git-status returns non-zero if nothing to do
            if ( getLogger().isInfoEnabled() )
            {
                getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to track)" );
            }
        }

        List<ScmFile> changedFiles = new ArrayList<ScmFile>();

        // rewrite all detected files to now have status 'checked_in'
        for ( ScmFile scmfile : statusConsumer.getChangedFiles() )
        {
            // if a specific fileSet is given, we have to check if the file is really tracked
            for ( File f : fileSet.getFileList() )
            {
                if ( FilenameUtils.separatorsToUnix( f.getPath() ).equals( scmfile.getPath() ) )
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

            // git-commit doesn't show single files, but only summary :/
            // so we must run git-status and consume the output
            // borrow a few things from the git-status command
            Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

            GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir(), relativeRepositoryPath );
            exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                // git-status returns non-zero if nothing to do
                if ( getLogger().isInfoEnabled() )
                {
                    getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to " +
                            "track)" );
                }
            }
           
            if ( statusConsumer.getChangedFiles().isEmpty() )
            {
                return new CheckInScmResult( null, statusConsumer.getChangedFiles() );
            }

            Commandline clCommit = createCommitCommandLine( repository, fileSet, messageFile );

            exitCode = GitCommandLineUtils.execute( clCommit, stdout, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                return new CheckInScmResult( clCommit.toString(), "The git-commit command failed.", stderr.getOutput(),
                                             false );
            }

            if( repo.isPushChanges() )
            {
                Commandline cl = createPushCommandLine( getLogger(), repository, fileSet, version );

                exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    return new CheckInScmResult( cl.toString(), "The git-push command failed.", stderr.getOutput(), false );
                }               
            }

            List<ScmFile> checkedInFiles = new ArrayList<ScmFile>( statusConsumer.getChangedFiles().size() );

            // rewrite all detected files to now have status 'checked_in'
            for ( ScmFile changedFile : statusConsumer.getChangedFiles() )
            {
                ScmFile scmfile = new ScmFile( changedFile.getPath(), ScmFileStatus.CHECKED_IN );

                if ( fileSet.getFileList().isEmpty() )
                {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

        // git-add doesn't show single files, but only summary :/
        // so we must run git-status and consume the output
        // borrow a few things from the git-status command
        Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

        GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir(), relativeRepositoryPath );
        stderr = new CommandLineUtils.StringStreamConsumer();
        exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            // git-status returns non-zero if nothing to do
            if ( getLogger().isInfoEnabled() )
            {
                getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to track)" );
            }
        }

        List<ScmFile> changedFiles = new ArrayList<ScmFile>();

        // rewrite all detected files to now have status 'checked_in'
        for ( ScmFile scmfile : statusConsumer.getChangedFiles() )
        {
            // if a specific fileSet is given, we have to check if the file is really tracked
            for ( File f : fileSet.getFileList() )
            {
                if ( FilenameUtils.separatorsToUnix( f.getPath() ).equals( scmfile.getPath() ) )
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

            }

            // The git-commit command doesn't show single files, but only summary :/
            // so we must run git-status and consume the output.
            // Borrow a few things from the git-status command.
            GitStatusConsumer statusConsumer = new GitStatusConsumer(getLogger(), fileSet.getBasedir());

            cl       = GitStatusCommand.createCommandLine(repository, fileSet);
            exitCode = GitCommandLineUtils.execute(cl, statusConsumer, stderr, getLogger());
            if (exitCode != 0) {
                // git-status returns non-zero if nothing to do.
                if (getLogger().isInfoEnabled()) {
                    getLogger().info("nothing added to commit but untracked files present (use \"git add\" to "
                                     + "track)");
                }
            }

            cl       = createCommitCommandLine(fileSet, messageFile);
            exitCode = GitCommandLineUtils.execute(cl, stdout, stderr, getLogger());
            if (exitCode != 0) {
                return new CheckInScmResult(cl.toString(), "The git-commit command failed.", stderr.getOutput(), false);
            }

            cl       = createPushCommandLine(fileSet, repository, version);
            exitCode = GitCommandLineUtils.execute(cl, stdout, stderr, getLogger());
            if (exitCode != 0) {
                return new CheckInScmResult(cl.toString(), "The git-push command failed.", stderr.getOutput(), false);
            }

            List<ScmFile> checkedInFiles = new ArrayList<ScmFile>(statusConsumer.getChangedFiles().size());

            // rewrite all detected files to now have status 'checked_in'
            for (Object foo : statusConsumer.getChangedFiles()) {
                ScmFile scmfile = new ScmFile(((ScmFile) foo).getPath(), ScmFileStatus.CHECKED_IN);

                if (fileSet.getFileList().isEmpty()) {
                    checkedInFiles.add(scmfile);
                } else {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

                // git-commit doesn't show single files, but only summary :/
                // so we must run git-status and consume the output
                // borrow a few things from the git-status command
                Commandline clStatus = GitStatusCommand.createCommandLine(repository, fileSet);

                GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir() );
                exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    // git-status returns non-zero if nothing to do
                    if ( getLogger().isInfoEnabled() )
                    {
                        getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to " +
                                "track)" );
                    }
                }

                if ( statusConsumer.getChangedFiles().isEmpty() )
                {
                    return new CheckInScmResult( null, statusConsumer.getChangedFiles() );
                }

                Commandline clCommit = createCommitCommandLine( repository, fileSet, messageFile );

                exitCode = GitCommandLineUtils.execute( clCommit, stdout, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    return new CheckInScmResult( clCommit.toString(), "The git-commit command failed.", stderr.getOutput(),
                                                 false );
                }

                if( repo.isPushChanges() )
                {
                    Commandline cl = createSpecificPushCommandLine( getLogger(), repository, fileSet, version );

                    exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );
                    if ( exitCode != 0 )
                    {
                        return new CheckInScmResult( cl.toString(), "The git-push command failed.", stderr.getOutput(), false );
                    }
                }

                List<ScmFile> checkedInFiles = new ArrayList<ScmFile>( statusConsumer.getChangedFiles().size() );

                // rewrite all detected files to now have status 'checked_in'
                for ( ScmFile changedFile : statusConsumer.getChangedFiles() )
                {
                    ScmFile scmfile = new ScmFile( changedFile.getPath(), ScmFileStatus.CHECKED_IN );

                    if ( fileSet.getFileList().isEmpty() )
                    {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

            // git-commit doesn't show single files, but only summary :/
            // so we must run git-status and consume the output
            // borrow a few things from the git-status command
            Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

            GitStatusConsumer statusConsumer =
                new GitStatusConsumer( getLogger(), fileSet.getBasedir(), relativeRepositoryPath );
            exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                // git-status returns non-zero if nothing to do
                if ( getLogger().isInfoEnabled() )
                {
                    getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to "
                                          + "track)" );
                }
            }
           
            if ( statusConsumer.getChangedFiles().isEmpty() )
            {
                return new CheckInScmResult( null, statusConsumer.getChangedFiles() );
            }

            Commandline clCommit = createCommitCommandLine( repository, fileSet, messageFile );

            exitCode = GitCommandLineUtils.execute( clCommit, stdout, stderr, getLogger() );
            if ( exitCode != 0 )
            {
                return new CheckInScmResult( clCommit.toString(), "The git-commit command failed.", stderr.getOutput(),
                                             false );
            }

            if ( repo.isPushChanges() )
            {
                Commandline cl = createPushCommandLine( getLogger(), repository, fileSet, version );

                exitCode = GitCommandLineUtils.execute( cl, stdout, stderr, getLogger() );
                if ( exitCode != 0 )
                {
                    return new CheckInScmResult( cl.toString(), "The git-push command failed.", stderr.getOutput(),
                                                 false );
                }               
            }

            List<ScmFile> checkedInFiles = new ArrayList<ScmFile>( statusConsumer.getChangedFiles().size() );

            // rewrite all detected files to now have status 'checked_in'
            for ( ScmFile changedFile : statusConsumer.getChangedFiles() )
            {
                ScmFile scmfile = new ScmFile( changedFile.getPath(), ScmFileStatus.CHECKED_IN );

                if ( fileSet.getFileList().isEmpty() )
                {
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

        // git-add doesn't show single files, but only summary :/
        // so we must run git-status and consume the output
        // borrow a few things from the git-status command
        Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

        GitStatusConsumer statusConsumer =
            new GitStatusConsumer( getLogger(), fileSet.getBasedir(), relativeRepositoryPath );
        stderr = new CommandLineUtils.StringStreamConsumer();
        exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            // git-status returns non-zero if nothing to do
            if ( getLogger().isInfoEnabled() )
            {
                getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to track)" );
            }
        }

        List<ScmFile> changedFiles = new ArrayList<ScmFile>();

        // rewrite all detected files to now have status 'checked_in'
        for ( ScmFile scmfile : statusConsumer.getChangedFiles() )
        {
            // if a specific fileSet is given, we have to check if the file is really tracked
            for ( File f : fileSet.getFileList() )
            {
                if ( FilenameUtils.separatorsToUnix( f.getPath() ).equals( scmfile.getPath() ) )
View Full Code Here

Examples of org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusConsumer

        // git-add doesn't show single files, but only summary :/
        // so we must run git-status and consume the output
        // borrow a few things from the git-status command
        Commandline clStatus = GitStatusCommand.createCommandLine( repository, fileSet );

        GitStatusConsumer statusConsumer = new GitStatusConsumer( getLogger(), fileSet.getBasedir() );
        exitCode = GitCommandLineUtils.execute( clStatus, statusConsumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            // git-status returns non-zero if nothing to do
            if ( getLogger().isInfoEnabled() )
            {
                getLogger().info( "nothing added to commit but untracked files present (use \"git add\" to track)" );
            }
        }

        List<ScmFile> changedFiles = new ArrayList<ScmFile>();

        // rewrite all detected files to now have status 'checked_in'
        for ( ScmFile scmfile : statusConsumer.getChangedFiles() )
        {
            // if a specific fileSet is given, we have to check if the file is really tracked
            for ( File f : fileSet.getFileList() )
            {
                if ( f.toString().equals( scmfile.getPath() ) )
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.