Examples of JazzScmCommand


Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        return new UpdateScmResult( updateCmd.getCommandString(), updateConsumer.getUpdatedFiles() );
    }

    public JazzScmCommand createAcceptCommand( ScmProviderRepository repo, ScmFileSet fileSet )
    {
        JazzScmCommand command = new JazzScmCommand( JazzConstants.CMD_ACCEPT, repo, fileSet, getLogger() );

        command.addArgument( JazzConstants.ARG_FLOW_COMPONENTS );

        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

                                  true );
    }

    protected JazzScmCommand createEditCommand( ScmProviderRepository repo, ScmFileSet fileSet )
    {
        JazzScmCommand command =
            new JazzScmCommand( JazzConstants.CMD_LOCK, JazzConstants.CMD_SUB_ACQUIRE, repo, fileSet, getLogger() );

        List<File> files = fileSet.getFileList();
        if ( files != null && !files.isEmpty() )
        {
            for ( File file : files )
            {
                command.addArgument( file.getPath() ); // Lock only the files specified
            }
        }
        else
        {
            command.addArgument( "." ); // Lock all files
        }
        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

                                    true );
    }

    public JazzScmCommand createUneditCommand( ScmProviderRepository repo, ScmFileSet fileSet )
    {
        JazzScmCommand command =
            new JazzScmCommand( JazzConstants.CMD_LOCK, JazzConstants.CMD_SUB_RELEASE, repo, fileSet, getLogger() );

        List<File> files = fileSet.getFileList();
        if ( files != null && !files.isEmpty() )
        {
            for ( File file : files )
            {
                command.addArgument( file.getPath() ); // Un-Lock only the files specified
            }
        }
        else
        {
            command.addArgument( "." ); // Un-Lock all files
        }

        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        return new BlameScmResult( blameCmd.getCommandString(), blameConsumer.getLines() );
    }

    public JazzScmCommand createBlameCommand( ScmProviderRepository repo, ScmFileSet fileSet, String filename )
    {
        JazzScmCommand command =
            new JazzScmCommand( JazzConstants.CMD_ANNOTATE, null, repo, false, fileSet, getLogger() );
        command.addArgument( filename );

        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        JazzScmProviderRepository jazzRepo = (JazzScmProviderRepository) repo;

        JazzListConsumer listConsumer = new JazzListConsumer( repo, getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );

        JazzScmCommand listCmd = createListCommand( jazzRepo, fileSet, recursive, version );
        int status = listCmd.execute( listConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new ListScmResult( listCmd.getCommandString(), "Error code for Jazz SCM list command - " + status,
                                      errConsumer.getOutput(), false );
        }

        return new ListScmResult( listCmd.getCommandString(), listConsumer.getFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

    public JazzScmCommand createListCommand( JazzScmProviderRepository repo, ScmFileSet fileSet, boolean recursive,
                                             ScmVersion version )
    {
        // recursive is implicit in the command, so it is ignored.
        // version is meaningless, so it is ignored.
        JazzScmCommand command =
            new JazzScmCommand( JazzConstants.CMD_LIST, JazzConstants.CMD_SUB_REMOTEFILES, repo, fileSet, getLogger() );
        command.addArgument( repo.getRepositoryWorkspace() );
        command.addArgument( repo.getComponent() );
        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        // This acts as a two phase operation.
        // The first pass is to call the "scm history" command to get a list
        // of the changeSets from Jazz SCM. It is stored in the revision of the
        // changeSets array.
        List<ChangeSet> changeSets = new ArrayList<ChangeSet>();
        JazzScmCommand historyCommand = createHistoryCommand( repo, fileSet );
        JazzHistoryConsumer changeLogConsumer = new JazzHistoryConsumer( repo, getLogger(), changeSets );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
        int status = historyCommand.execute( changeLogConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new ChangeLogScmResult( historyCommand.getCommandString(),
                                           "Error code for Jazz SCM history command - " + status,
                                           errConsumer.getOutput(), false );
        }

        // Now, call the "scm list changesets" command, passing in the list of changesets from the first pass.
        JazzScmCommand listChangesetsCommand = createListChangesetCommand( repo, fileSet, changeSets );
        JazzListChangesetConsumer listChangesetConsumer =
            new JazzListChangesetConsumer( repo, getLogger(), changeSets, datePattern );
        errConsumer = new ErrorConsumer( getLogger() );
        status = listChangesetsCommand.execute( listChangesetConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new ChangeLogScmResult( listChangesetsCommand.getCommandString(),
                                           "Error code for Jazz SCM list changesets command - " + status,
                                           errConsumer.getOutput(), false );
        }

        // Build the result and return it.
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        }

        // Now that we have a list of files to process, we can "add" (scm checkin) them.
        JazzAddConsumer addConsumer = new JazzAddConsumer( repo, getLogger() );
        ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
        JazzScmCommand command = createAddCommand( repo, fileSet );

        int status = command.execute( addConsumer, errConsumer );
        if ( status != 0 || errConsumer.hasBeenFed() )
        {
            return new AddScmResult( command.getCommandString(),
                                     "Error code for Jazz SCM add (checkin) command - " + status,
                                     errConsumer.getOutput(), false );
        }

        return new AddScmResult( command.getCommandString(), addConsumer.getFiles() );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

        return new ChangeLogScmResult( historyCommand.getCommandString(), changeLogSet );
    }

    protected JazzScmCommand createHistoryCommand( ScmProviderRepository repo, ScmFileSet fileSet )
    {
        JazzScmCommand command = new JazzScmCommand( JazzConstants.CMD_HISTORY, repo, fileSet, getLogger() );
        command.addArgument( JazzConstants.ARG_MAXIMUM );
        command.addArgument( "10000000" );      // Beyond me as to why they didn't make 0 = all.
        // And just to really annoy us, it defaults to 10.
        // So we put something stupidly large in there instead.

        return command;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.jazz.command.JazzScmCommand

    protected JazzScmCommand createListChangesetCommand( ScmProviderRepository repo, ScmFileSet fileSet,
                                                         List<ChangeSet> changeSets )
    {
        JazzScmProviderRepository jazzRepo = (JazzScmProviderRepository) repo;
        JazzScmCommand command =
            new JazzScmCommand( JazzConstants.CMD_LIST, JazzConstants.CMD_SUB_CHANGESETS, repo, fileSet, getLogger() );
        command.addArgument( JazzConstants.ARG_WORKSPACE );
        command.addArgument( jazzRepo.getWorkspace() );
        for ( int i = 0; i < changeSets.size(); i++ )
        {
            command.addArgument( changeSets.get( i ).getRevision() );
        }
        return command;
    }
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.