Package org.apache.maven.scm

Examples of org.apache.maven.scm.ScmResult


        {
            ScmRepository repository = getScmRepository();

            this.prepareOutputDirectory( getCheckoutDirectory() );

            ScmResult result = null;

            ScmFileSet fileSet = new ScmFileSet( getCheckoutDirectory().getAbsoluteFile() );
            if ( useExport )
            {
                result = getScmManager().export( repository,fileSet, getScmVersion( scmVersionType, scmVersion ) );
View Full Code Here


        //Add to repository
        String[] add_cmd = new String[] { BazaarConstants.ADD_CMD };
        ScmFileSet filesToAdd = new ScmFileSet( new File( "" ), files );
        add_cmd = BazaarUtils.expandCommandLine( add_cmd, filesToAdd );
        ScmResult result = BazaarUtils.execute( WORKING_DIR, add_cmd );
        if ( !result.isSuccess() )
        {
            String message =
                "Provider message: " + result.getProviderMessage() + "\n" + "Output: " + result.getCommandOutput();
            throw new Exception( message );
        }

        // Commit the initial repository
        String[] commit_cmd = new String[]{BazaarConstants.COMMIT_CMD, BazaarConstants.MESSAGE_OPTION, COMMIT_MESSAGE};
        result = BazaarUtils.execute( WORKING_DIR, commit_cmd );
        if ( !result.isSuccess() )
        {
            String message =
                "Provider message: " + result.getProviderMessage() + "\n" + "Output: " + result.getCommandOutput();
            throw new Exception( message );
        }
    }
View Full Code Here

                    throw new ScmException(
                        "Unable to add file to SCM: " + scmFile + "; see error messages above for more information" );
                }
            }

            ScmResult result =
                scmProvider.checkIn( scmRepository, new ScmFileSet( checkoutDirectory ), makeScmVersion(), msg );

            checkScmResult( result );
        }
        catch ( ScmException e )
View Full Code Here

        }

        public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
            throws ScmException
        {
            return new StatusScmResult( changedFiles, new ScmResult( null, null, null, true ) );
        }
View Full Code Here

        parameters.setScmVersion(CommandParameter.SCM_VERSION, new ScmBranch(siteBranch));

        parameters.setString(CommandParameter.MESSAGE, msg);

        ScmResult result = (CheckInScmResult) executeCommand((GitExeScmProvider) scmProvider, new GitSiteCheckInCommand(),
                                                             scmRepository.getProviderRepository(),
                                                             new ScmFileSet(checkoutDirectory), parameters);

        checkScmResult(result);
    }
View Full Code Here

        }

        // Commit to local branch
        String[] commitCmd = new String[]{ HgCommandConstants.COMMIT_CMD, HgCommandConstants.MESSAGE_OPTION, message };
        commitCmd = HgUtils.expandCommandLine( commitCmd, fileSet );
        ScmResult result =
            HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), commitCmd );

        // Push to parent branch if any
        HgScmProviderRepository repository = (HgScmProviderRepository) repo;
View Full Code Here

                {
                    logger.error( providerMsg );
                }
            }

            return new ScmResult( cmd.toString(), providerMsg, consumer.getStdErr(), success );
        }
        catch ( ScmException se )
        {
            String msg =
                "EXECUTION FAILED" + "\n  Execution failed before invoking the Hg command. Last exception:" + "\n    "
View Full Code Here

    public static boolean differentOutgoingBranchFound( ScmLogger logger, File workingDir, String workingbranchName )
        throws ScmException
    {
        String[] outCmd = new String[]{ HgCommandConstants.OUTGOING_CMD };
        HgOutgoingConsumer outConsumer = new HgOutgoingConsumer( logger );
        ScmResult outResult = HgUtils.execute( outConsumer, logger, workingDir, outCmd );
        List<HgChangeSet> changes = outConsumer.getChanges();
        if ( outResult.isSuccess() )
        {
            for ( HgChangeSet set : changes )
            {
                if ( set.getBranch() != null )
                {
View Full Code Here

            return new CheckInScmResult( "si ci/drop", changedFiles );
        }
        else
        {
            return new CheckInScmResult( changedFiles,
                                         new ScmResult( "si ci/drop", "There was a problem updating the repository", "",
                                                        false ) );
        }
    }
View Full Code Here

    {

        File workingDir = fileSet.getBasedir();
        HgStatusConsumer consumer = new HgStatusConsumer( getLogger(), workingDir );
        String[] statusCmd = new String[] { HgCommandConstants.STATUS_CMD };
        ScmResult result = HgUtils.execute( consumer, getLogger(), workingDir, statusCmd );

        return new StatusScmResult( consumer.getStatus(), result );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.ScmResult

Copyright © 2018 www.massapicom. 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.