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


        {
            ScmFileSet fileSet = new ScmFileSet( checkoutDirectory, includes, excludes );

            ScmBranch branch = ( scmBranch == null ) ? null : new ScmBranch( scmBranch );

            ScmResult scmResult = null;
            if ( tryUpdate && !forceCheckout )
            {
                scmResult = scmProvider.update( scmRepository, fileSet, branch );
            }
            else
View Full Code Here

            } else if (repository.getProviderRepository() instanceof GitScmProviderRepository) {
              GitBranchParseCommand command = new GitBranchParseCommand();

              command.setLogger(getLogger());

              ScmResult execute = command.execute(repository.getProviderRepository(),
                  new ScmFileSet( scmDirectory ),
                  new CommandParameters());
              String output = execute.getCommandOutput();
              getLog().debug("Output: " + output);
              String[] split = StringUtils.split(output);
              getLog().debug("Split output: " + Arrays.toString(split));
              if(split.length<2){
                  getLog().error( "Cannot get the branch information from the scm repository : " +
View Full Code Here

    protected String getChangeSet()
        throws ScmException, MojoExecutionException
    {
        HgOutputConsumer consumer = new HgOutputConsumer( logger );
        ScmResult result = HgUtils.execute( consumer, logger, scmDirectory, new String[] { "id", "-i" } );
        checkResult( result );
        return consumer.getOutput();
    }
View Full Code Here

    protected String getChangeSetDate( int revision )
        throws ScmException, MojoExecutionException
    {
        HgOutputConsumer consumer = new HgOutputConsumer( logger );
        ScmResult result =
            HgUtils.execute( consumer, logger, scmDirectory, new String[] { "log", "-r", String.valueOf( revision ),
                "--template", "\"{date|isodate}\"" } );
        checkResult( result );
        return consumer.getOutput();
    }
View Full Code Here

    protected int getRevision()
        throws ScmException, MojoExecutionException
    {
        HgOutputConsumer consumer = new HgOutputConsumer( logger );
        ScmResult result = HgUtils.execute( consumer, logger, scmDirectory, new String[] { "id", "-n" } );
        checkResult( result );
        String output = consumer.getOutput();
        output = StringUtils.chompLast( output, "+" ); // Remove trailing 'dirty'
        // flag
        return Integer.parseInt( output );
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

        super.execute();

        if ( this.getCheckoutResult() != null )
        {
           
            ScmResult checkoutResult = this.getCheckoutResult();
           
            //At the time of useExport feature is requested only SVN and and CVS have export command implemented
            // we will deal with this as more user using this feature specially clearcase where we need to
            // add relativePathProjectDirectory support to ExportScmResult
            String relativePathProjectDirectory = "";
View Full Code Here

            cmd.add( HgCommandConstants.LIMIT_OPTION );
            cmd.add( Integer.toString( limit ) );
        }

        HgChangeLogConsumer consumer = new HgChangeLogConsumer( getLogger(), datePattern );
        ScmResult result =
            HgUtils.execute( consumer, getLogger(), fileSet.getBasedir(), cmd.toArray( new String[cmd.size()] ) );

        List<ChangeSet> logEntries = consumer.getModifications();
        ChangeLogSet changeLogSet = new ChangeLogSet( logEntries, startDate, endDate );
        return new ChangeLogScmResult( changeLogSet, result );
View Full Code Here

        String[] cmd = new String[]{ HgCommandConstants.LOG_CMD, HgCommandConstants.TEMPLATE_OPTION,
            HgCommandConstants.TEMPLATE_FORMAT, HgCommandConstants.NO_MERGES_OPTION, HgCommandConstants.REVISION_OPTION,
            revisionInterval.toString() };
        HgChangeLogConsumer consumer = new HgChangeLogConsumer( getLogger(), datePattern );
        ScmResult result = HgUtils.execute( consumer, getLogger(), fileSet.getBasedir(), cmd );

        List<ChangeSet> logEntries = consumer.getModifications();
        Date startDate = null;
        Date endDate = null;
        if ( !logEntries.isEmpty() )
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.