Refine search
/** {@inheritDoc} */ public void info( String content, Throwable error ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( content, error ); } } }
public static int execute( Commandline cl, StreamConsumer consumer, CommandLineUtils.StringStreamConsumer stderr, ScmLogger logger ) throws ScmException { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + cl ); logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } int exitCode; try { exitCode = CommandLineUtils.executeCommandLine( cl, consumer, stderr ); } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } return exitCode; }
/** * Executes a 'si drop' command using the relativeName for the member name * * @param memberFile Full path to the member's current sandbox location * @param relativeName Relative path from the nearest subproject or project * @return MKS API Response object * @throws APIException */ private Response dropMember( File memberFile, String relativeName ) throws APIException { // Setup the drop command api.getLogger().info( "Dropping member " + memberFile.getAbsolutePath() ); Command siDrop = new Command( Command.SI, "drop" ); siDrop.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) ); siDrop.addOption( new Option( "noconfirm" ) ); siDrop.addOption( new Option( "cpid", cpid ) ); siDrop.addOption( new Option( "delete" ) ); siDrop.addSelection( relativeName ); return api.runCommand( siDrop ); }
public static int execute( Commandline cl, CommandLineUtils.StringStreamConsumer stdout, CommandLineUtils.StringStreamConsumer stderr, ScmLogger logger ) throws ScmException { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + cl ); logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } int exitCode; try { exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr ); } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } return exitCode; }
/** * Executes a 'si drop' command using the relativeName for the member name * * @param memberFile Full path to the member's current sandbox location * @param relativeName Relative path from the nearest subproject or project * @return MKS API Response object * @throws APIException */ private Response dropMember( File memberFile, String relativeName ) throws APIException { // Setup the drop command api.getLogger().info( "Dropping member " + memberFile.getAbsolutePath() ); Command siDrop = new Command( Command.SI, "drop" ); siDrop.addOption( new Option( "cwd", memberFile.getParentFile().getAbsolutePath() ) ); siDrop.addOption( new Option( "noconfirm" ) ); siDrop.addOption( new Option( "cpid", cpid ) ); siDrop.addOption( new Option( "delete" ) ); siDrop.addSelection( relativeName ); return api.runCommand( siDrop ); }
/** {@inheritDoc} */ public void info( String content ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( content ); } } }
public static int execute( Commandline cl, StreamConsumer consumer, CommandLineUtils.StringStreamConsumer stderr, ScmLogger logger ) throws ScmException { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + cl ); logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } int exitCode; try { exitCode = CommandLineUtils.executeCommandLine( cl, consumer, stderr ); } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } return exitCode; }
/** {@inheritDoc} */ public void info( String content ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( content ); } } }
public static int execute( Commandline cl, CommandLineUtils.StringStreamConsumer stdout, CommandLineUtils.StringStreamConsumer stderr, ScmLogger logger ) throws ScmException { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + cl ); logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } int exitCode; try { exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr ); } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } return exitCode; }
/** {@inheritDoc} */ public void info( Throwable error ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( error ); } } }
public static int executeCommandline( Commandline cl, StreamConsumer consumer, CommandLineUtils.StringStreamConsumer stderr, ScmLogger logger ) throws ScmException { try { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + cl ); logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } int exitcode = CommandLineUtils.executeCommandLine( cl, consumer, stderr ); if ( logger.isDebugEnabled() ) { logger.debug( "VSS Command Exit_Code: " + exitcode ); } return exitcode; } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } }
/** {@inheritDoc} */ public void consumeLine( String line ) { if ( logger.isInfoEnabled() ) { logger.info( line ); } }
/** {@inheritDoc} */ protected StatusScmResult executeStatusCommand( ScmProviderRepository repo, ScmFileSet fileSet ) throws ScmException { CvsScmProviderRepository repository = (CvsScmProviderRepository) repo; Commandline cl = CvsCommandUtils.getBaseCommand( "update", repository, fileSet, "-n" ); cl.createArg().setValue( "-d" ); if ( getLogger().isInfoEnabled() ) { getLogger().info( "Executing: " + cl ); getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } return executeCvsCommand( cl ); }
/** {@inheritDoc} */ public void info( Throwable error ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( error ); } } }
/** {@inheritDoc} */ protected StatusScmResult executeStatusCommand( ScmProviderRepository repo, ScmFileSet fileSet ) throws ScmException { CvsScmProviderRepository repository = (CvsScmProviderRepository) repo; Commandline cl = CvsCommandUtils.getBaseCommand( "update", repository, fileSet, "-n" ); cl.createArg().setValue( "-d" ); if ( getLogger().isInfoEnabled() ) { getLogger().info( "Executing: " + cl ); getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } return executeCvsCommand( cl ); }
/** {@inheritDoc} */ public void consumeLine( String line ) { if ( logger.isInfoEnabled() ) { logger.info( line ); } }
public static int executeCleanUp( File workinDirectory, StreamConsumer stdout, StreamConsumer stderr, ScmLogger logger ) throws CommandLineException { Commandline cl = new Commandline(); cl.setExecutable( "svn" ); cl.setWorkingDirectory( workinDirectory.getAbsolutePath() ); if ( logger != null ) { if ( logger.isInfoEnabled() ) { logger.info( "Executing: " + SvnCommandLineUtils.cryptPassword( cl ) ); if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { logger.info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } } } return CommandLineUtils.executeCommandLine( cl, stdout, stderr ); }
/** {@inheritDoc} */ public void info( String content, Throwable error ) { for ( ScmLogger logger : listeners ) { if ( logger.isInfoEnabled() ) { logger.info( content, error ); } } }
/** * {@inheritDoc} */ public BlameScmResult executeBlameCommand( ScmProviderRepository repo, ScmFileSet fileSet, String filename ) throws ScmException { CvsScmProviderRepository repository = (CvsScmProviderRepository) repo; Commandline cl = CvsCommandUtils.getBaseCommand( "annotate", repository, fileSet ); cl.createArg().setValue( filename ); if ( getLogger().isInfoEnabled() ) { getLogger().info( "Executing: " + cl ); getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } return executeCvsCommand( cl, repository ); }
private void checkUnexpectedParameter( StringTokenizer tokenizer, int tokenNumber, int maxTokenNumber ) { if ( tokenNumber > maxTokenNumber ) { String unexpectedToken = tokenizer.nextToken(); if ( logger.isInfoEnabled() ) { logger.info( "The SCM URL contains unused parameter : " + unexpectedToken ); } } }