/** * @deprecated Use {@link CommandLineUtils#toString(String[])} instead. */ public static String toString( String[] line ) { return CommandLineUtils.toString( line ); }
log.debug("Arguments: " + CommandLineUtils.toString(args));
/** * {@inheritDoc} */ protected ScmResult executeRemoveCommand( ScmProviderRepository repo, ScmFileSet files, String message ) throws ScmException { Commandline cl = createCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files ); PerforceRemoveConsumer consumer = new PerforceRemoveConsumer(); try { CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { throw new ScmException( "CommandLineException " + e.getMessage(), e ); } return new RemoveScmResult( cl.toString(), consumer.getRemovals() ); }
/** * {@inheritDoc} */ protected ScmResult executeRemoveCommand( ScmProviderRepository repo, ScmFileSet files, String message ) throws ScmException { Commandline cl = createCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files ); PerforceRemoveConsumer consumer = new PerforceRemoveConsumer(); try { CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { throw new ScmException( "CommandLineException " + e.getMessage(), e ); } return new RemoveScmResult( cl.toString(), consumer.getRemovals() ); }
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
/** {@inheritDoc} */ protected ScmResult executeAddCommand( ScmProviderRepository repo, ScmFileSet files, String message, boolean binary ) throws ScmException { Commandline cl = createCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files ); PerforceAddConsumer consumer = new PerforceAddConsumer(); try { CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } return new AddScmResult( cl.toString(), consumer.getAdditions() ); }
/** {@inheritDoc} */ protected ScmResult executeAddCommand( ScmProviderRepository repo, ScmFileSet files, String message, boolean binary ) throws ScmException { Commandline cl = createCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files ); PerforceAddConsumer consumer = new PerforceAddConsumer(); try { CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } return new AddScmResult( cl.toString(), consumer.getAdditions() ); }
private Commandline readOpened( PerforceScmProviderRepository prepo, ScmFileSet files, PerforceStatusConsumer consumer ) { Commandline cl = createOpenedCommandLine( prepo, files.getBasedir(), actualLocation ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) ); } CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } return cl; }
private void syncLabel( ScmProviderRepository repo, ScmFileSet files, String tag, PerforceTagConsumer consumer ) { Commandline cl = createLabelsyncCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files, tag ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( PerforceScmProvider.clean( "Executing: " + cl.toString() ) ); } CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } }
private void syncLabel( ScmProviderRepository repo, ScmFileSet files, String tag, PerforceTagConsumer consumer ) { Commandline cl = createLabelsyncCommandLine( (PerforceScmProviderRepository) repo, files.getBasedir(), files, tag ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( PerforceScmProvider.clean( "Executing: " + cl.toString() ) ); } CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } }
private Commandline readOpened( PerforceScmProviderRepository prepo, ScmFileSet files, PerforceStatusConsumer consumer ) { Commandline cl = createOpenedCommandLine( prepo, files.getBasedir(), actualLocation ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) ); } CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err ); if ( exitCode != 0 ) { String cmdLine = CommandLineUtils.toString( cl.getCommandline() ); StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() ); msg.append( '\n' ); msg.append( "Command line was:" + cmdLine ); throw new CommandLineException( msg.toString() ); } } catch ( CommandLineException e ) { if ( getLogger().isErrorEnabled() ) { getLogger().error( "CommandLineException " + e.getMessage(), e ); } } return cl; }
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
getLogger().debug( "Executing: " + CommandLineUtils.toString( shell.getCommandline() ) ); int exitCode = CommandLineUtils.executeCommandLine( shell, shellConsumer, shellConsumer ); if ( exitCode != 0 )
getLogger().debug( "Executing: " + CommandLineUtils.toString( shell.getCommandline() ) ); int exitCode = CommandLineUtils.executeCommandLine( shell, shellConsumer, shellConsumer ); if ( exitCode != 0 )
shell.createArg().setValue( '"' + filename + '"' ); IntegrityFileInfoConsumer shellConsumer = new IntegrityFileInfoConsumer( getLogger() ); String commandLine = CommandLineUtils.toString( shell.getCommandline() );
shell.createArg().setValue( '"' + filename + '"' ); IntegrityBlameConsumer shellConsumer = new IntegrityBlameConsumer( getLogger() ); String commandLine = CommandLineUtils.toString( shell.getCommandline() );