Examples of BazaarConsumer


Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

    public static ScmResult execute( File workingDir, String[] cmdAndArgs )
        throws ScmException
    {
        ScmLogger logger = new DefaultLog();
        return execute( new BazaarConsumer( logger ), logger, workingDir, cmdAndArgs );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

        File workingDir = fileSet.getBasedir();

        // Update branch
        String[] updateCmd = new String[] { BazaarConstants.PULL_CMD };
        ScmResult updateResult = BazaarUtils.execute( new BazaarConsumer( getLogger() ), getLogger(), workingDir,
                                                      updateCmd );

        if ( !updateResult.isSuccess() )
        {
            return new UpdateScmResult( null, null, updateResult );
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

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

        // Push to parent branch if any
        BazaarScmProviderRepository repository = (BazaarScmProviderRepository) repo;
        if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) && repo.isPushChanges() )
        {
            String[] pushCmd = new String[] { BazaarConstants.PUSH_CMD, BazaarConstants.NO_STRICT_OPTION, repository.getURI() };
            result =
                BazaarUtils.execute( new BazaarConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
        }

        return new CheckInScmResult( commitedFiles, result );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

    public static ScmResult execute( File workingDir, String[] cmdAndArgs )
        throws ScmException
    {
        ScmLogger logger = new DefaultLog();
        return execute( new BazaarConsumer( logger ), logger, workingDir, cmdAndArgs );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

        checkoutCmd.add( checkoutDir.getAbsolutePath() );
        if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) {
             checkoutCmd.add( BazaarConstants.REVISION_OPTION );
             checkoutCmd.add( "tag:" + version.getName() );
        }
        BazaarConsumer checkoutConsumer = new BazaarConsumer( getLogger() );
        BazaarUtils.execute( checkoutConsumer, getLogger(), checkoutDir.getParentFile(),
                             (String[]) checkoutCmd.toArray( new String[0] ) );

        // Do inventory to find list of checkedout files
        String[] inventoryCmd = new String[]{BazaarConstants.INVENTORY_CMD};
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

            throw new ScmException( "tagging specific files is not allowed" );
        }
       
        // Perform the tagging operation
        File bazaarRoot = fileSet.getBasedir();
        BazaarConsumer consumer = new BazaarConsumer( getLogger() );
        String[] tagCmd = new String[] { BazaarConstants.TAG_CMD, tagName };
        ScmResult tagResult = BazaarUtils.execute( consumer, getLogger(), bazaarRoot, tagCmd );
        if ( !tagResult.isSuccess() ) {
            return new TagScmResult( null, tagResult );
        }

        // Do "bzr ls -R -r tag:tagName" to get a list of the tagged files
        BazaarLsConsumer lsConsumer =
            new BazaarLsConsumer( getLogger(), bazaarRoot, ScmFileStatus.TAGGED );
        String[] lsCmd = new String[] {
                                       BazaarConstants.LS_CMD,
                                       BazaarConstants.RECURSIVE_OPTION,
                                       BazaarConstants.REVISION_OPTION,
                                       "tag:" + tagName
                                       };
        ScmResult lsResult = BazaarUtils.execute(lsConsumer, getLogger(), bazaarRoot, lsCmd);
        if ( !lsResult.isSuccess() ) {
            return new TagScmResult( null, lsResult );
        }
       
        // Push new tags to parent branch if any
        BazaarScmProviderRepository bazaarRepository = (BazaarScmProviderRepository) repository;
        if ( !bazaarRepository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) && repository.isPushChanges() )
        {
            String[] pushCmd = new String[] { BazaarConstants.PUSH_CMD, bazaarRepository.getURI() };
            ScmResult pushResult =
                BazaarUtils.execute( new BazaarConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
            if ( !pushResult.isSuccess() ) {
                return new TagScmResult( null, pushResult );
            }
        }
       
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

    public static ScmResult execute( File workingDir, String[] cmdAndArgs )
        throws ScmException
    {
        ScmLogger logger = new DefaultLog();
        return execute( new BazaarConsumer( logger ), logger, workingDir, cmdAndArgs );
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
        {
             checkoutCmd.add( BazaarConstants.REVISION_OPTION );
             checkoutCmd.add( "tag:" + version.getName() );
        }
        BazaarConsumer checkoutConsumer = new BazaarConsumer( getLogger() );
        BazaarUtils.execute( checkoutConsumer, getLogger(), checkoutDir.getParentFile(),
                             (String[]) checkoutCmd.toArray( new String[0] ) );

        // Do inventory to find list of checkedout files
        String[] inventoryCmd = new String[]{BazaarConstants.INVENTORY_CMD};
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

            throw new ScmException( "tagging specific files is not allowed" );
        }

        // Perform the tagging operation
        File bazaarRoot = fileSet.getBasedir();
        BazaarConsumer consumer = new BazaarConsumer( getLogger() );
        String[] tagCmd = new String[] { BazaarConstants.TAG_CMD, tagName };
        ScmResult tagResult = BazaarUtils.execute( consumer, getLogger(), bazaarRoot, tagCmd );
        if ( !tagResult.isSuccess() )
        {
            return new TagScmResult( null, tagResult );
        }

        // Do "bzr ls -R -r tag:tagName" to get a list of the tagged files
        BazaarLsConsumer lsConsumer = new BazaarLsConsumer( getLogger(), bazaarRoot, ScmFileStatus.TAGGED );
        String[] lsCmd = new String[] {
                                       BazaarConstants.LS_CMD,
                                       BazaarConstants.RECURSIVE_OPTION,
                                       BazaarConstants.REVISION_OPTION,
                                       "tag:" + tagName
                                       };
        ScmResult lsResult = BazaarUtils.execute( lsConsumer, getLogger(), bazaarRoot, lsCmd );
        if ( !lsResult.isSuccess() )
        {
            return new TagScmResult( null, lsResult );
        }

        // Push new tags to parent branch if any
        BazaarScmProviderRepository bazaarRepository = (BazaarScmProviderRepository) repository;
        if ( !bazaarRepository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) && repository.isPushChanges() )
        {
            String[] pushCmd = new String[] { BazaarConstants.PUSH_CMD, bazaarRepository.getURI() };
            ScmResult pushResult =
                BazaarUtils.execute( new BazaarConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
            if ( !pushResult.isSuccess() )
            {
                return new TagScmResult( null, pushResult );
            }
        }
View Full Code Here

Examples of org.apache.maven.scm.provider.bazaar.command.BazaarConsumer

        File workingDir = fileSet.getBasedir();

        // Update branch
        String[] updateCmd = new String[] { BazaarConstants.PULL_CMD };
        ScmResult updateResult = BazaarUtils.execute( new BazaarConsumer( getLogger() ), getLogger(), workingDir,
                                                      updateCmd );

        if ( !updateResult.isSuccess() )
        {
            return new UpdateScmResult( null, null, updateResult );
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.