Examples of UnEditScmResult


Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

            int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

            if ( exitCode != 0 )
            {
                return new UnEditScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(), false );
            }
        }
        else
        {
            //edit only interested files already on the local disk
            for ( int i = 0; i < unlockFiles.size(); ++i )
            {
                ScmFileSet unlockFile = new ScmFileSet( fileSet.getBasedir(), (File) unlockFiles.get( i ) );
                Commandline cl = createCommandLine( repository, unlockFile );

                int exitCode = StarteamCommandLineUtils.executeCommandline( cl, consumer, stderr, getLogger() );

                if ( exitCode != 0 )
                {
                    return new UnEditScmResult( cl.toString(), "The starteam command failed.", stderr.getOutput(),
                                                false );
                }
            }
        }

        return new UnEditScmResult( null, consumer.getUnEditFiles() );

    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        setEditScmResult( new EditScmResult( "", "", "", true ) );
        setExportScmResult( new ExportScmResult( "", "", "", true ) );
        setRemoveScmResult( new RemoveScmResult( "", "", "", true ) );
        setStatusScmResult( new StatusScmResult( "", "", "", true ) );
        setTagScmResult( new TagScmResult( "", "", "", true ) );
        setUnEditScmResult( new UnEditScmResult( "", "", "", true ) );
        setUpdateScmResult( new UpdateScmResult( "", "", "", true ) );
        setBlameScmResult( new BlameScmResult( "", "", "", true ) );
        setMkdirScmResult( new MkdirScmResult( "", "", "", true ) );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

            }
        }

        if ( consumer.isSuccess() )
        {
            return new UnEditScmResult( cl.toString(), consumer.getEdits() );
        }

        return new UnEditScmResult( cl.toString(), "Unable to revert", consumer.getOutput(), consumer.isSuccess() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        List<ScmFile> files = new ArrayList<ScmFile>();
        for ( File f : fileSet.getFileList() )
        {
            files.add( new ScmFile( f.getPath(), ScmFileStatus.UNKNOWN ) );
        }
        return new UnEditScmResult( "", files );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        try
        {
            ScmRepository repository = getScmRepository();

            UnEditScmResult result = getScmManager().unedit( repository, getFileSet() );

            checkResult( result );
        }
        catch ( IOException e )
        {
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        ErrorStreamConsumer err = new ErrorStreamConsumer();
        TfsCommand command = createCommand( r, f );
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new UnEditScmResult( command.getCommandString(), "Error code for TFS unedit command - " + status,
                                        err.getOutput(), false );
        }
        return new UnEditScmResult( command.getCommandString(), out.getFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        try
        {
            ScmRepository repository = getScmRepository();

            UnEditScmResult result = getScmManager().unedit( repository, getFileSet() );

            checkResult( result );
        }
        catch ( IOException e )
        {
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

    public UnEditScmResult executeUnEditCommand( ScmProviderRepository repository, ScmFileSet fileSet )
        throws ScmException
    {
        getLogger().info( "Attempting to revert members in sandbox " + fileSet.getBasedir().getAbsolutePath() );
        IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
        UnEditScmResult result;
        try
        {
            Sandbox siSandbox = iRepo.getSandbox();
            Response res = siSandbox.revertMembers();
            int exitCode = res.getExitCode();
            boolean success = ( exitCode == 0 ? true : false );
            result = new UnEditScmResult( res.getCommandString(), "", "Exit Code: " + exitCode, success );
        }
        catch ( APIException aex )
        {
            ExceptionHandler eh = new ExceptionHandler( aex );
            getLogger().error( "MKS API Exception: " + eh.getMessage() );
            getLogger().info( eh.getCommand() + " exited with return code " + eh.getExitCode() );
            result = new UnEditScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
        }

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        ErrorStreamConsumer err = new ErrorStreamConsumer();
        TfsCommand command = createCommand( r, f );
        int status = command.execute( out, err );
        if ( status != 0 || err.hasBeenFed() )
        {
            return new UnEditScmResult( command.getCommandString(), "Error code for TFS unedit command - " + status,
                                        err.getOutput(), false );
        }
        return new UnEditScmResult( command.getCommandString(), out.getFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.command.unedit.UnEditScmResult

        setEditScmResult( new EditScmResult( "", "", "", true ) );
        setExportScmResult( new ExportScmResult( "", "", "", true ) );
        setRemoveScmResult( new RemoveScmResult( "", "", "", true ) );
        setStatusScmResult( new StatusScmResult( "", "", "", true ) );
        setTagScmResult( new TagScmResult( "", "", "", true ) );
        setUnEditScmResult( new UnEditScmResult( "", "", "", true ) );
        setUpdateScmResult( new UpdateScmResult( "", "", "", true ) );
        setBlameScmResult( new BlameScmResult( "", "", "", true ) );
        setMkdirScmResult( new MkdirScmResult( "", "", "", 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.