Examples of HgScmProviderRepository


Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

        // keep the command about in string form for reporting
        StringBuilder cmd = joinCmd( tagCmd );
        HgTagConsumer consumer = new HgTagConsumer( getLogger() );
        ScmResult result = HgUtils.execute( consumer, getLogger(), workingDir, tagCmd );
        HgScmProviderRepository repository = (HgScmProviderRepository) scmProviderRepository;
        if ( result.isSuccess() )
        {
            // now push
            // Push to parent branch if any

            if ( repository.isPushChanges() )
            {
                if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
                {
                    String branchName = HgUtils.getCurrentBranchName( getLogger(), workingDir );
                    boolean differentOutgoingBranch =
                        HgUtils.differentOutgoingBranchFound( getLogger(), workingDir, branchName );

                    String[] pushCmd = new String[]{ HgCommandConstants.PUSH_CMD,
                        differentOutgoingBranch ? HgCommandConstants.REVISION_OPTION + branchName : null,
                        repository.getURI() };

                    result =
                        HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
                }
            }
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

                return result;
            }

        }

        result.repository = new HgScmProviderRepository( url );

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

        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;

        if ( repo.isPushChanges() )
        {

            if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
            {
                String[] pushCmd = new String[]{ HgCommandConstants.PUSH_CMD,
                    differentOutgoingBranch ? HgCommandConstants.REVISION_OPTION + branchName : null,
                    repository.getURI() };

                result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
            }

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

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

        // keep the command about in string form for reporting
        StringBuilder cmd = joinCmd( tagCmd );
        HgTagConsumer consumer = new HgTagConsumer( getLogger() );
        ScmResult result = HgUtils.execute( consumer, getLogger(), workingDir, tagCmd );
        HgScmProviderRepository repository = (HgScmProviderRepository) scmProviderRepository;
        if ( result.isSuccess() )
        {
            // now push
            // Push to parent branch if any

            if ( repository.isPushChanges() )
            {
                if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
                {
                    String branchName = HgUtils.getCurrentBranchName( getLogger(), workingDir );
                    boolean differentOutgoingBranch =
                        HgUtils.differentOutgoingBranchFound( getLogger(), workingDir, branchName );

                    String[] pushCmd = new String[]{ HgCommandConstants.PUSH_CMD,
                        differentOutgoingBranch ? HgCommandConstants.REVISION_OPTION + branchName : null,
                        repository.getURI() };

                    result =
                        HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
                }
            }
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

                // noop
            }
        };

        ScmResult result = HgUtils.execute( branchConsumer, getLogger(), workingDir, branchCmd );
        HgScmProviderRepository repository = (HgScmProviderRepository) scmProviderRepository;

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Error while executing command " + joinCmd( branchCmd ) );
        }

        // First commit.
        String[] commitCmd =
            new String[] { HgCommandConstants.COMMIT_CMD, HgCommandConstants.MESSAGE_OPTION,
                scmBranchParameters.getMessage() };

        result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), workingDir, commitCmd );

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Error while executing command " + joinCmd( commitCmd ) );
        }

        // now push, if we should.

        if ( repository.isPushChanges() )
        {
            if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
            {

                String[] pushCmd = new String[] {
                    HgCommandConstants.PUSH_CMD,
                    HgCommandConstants.NEW_BRANCH_OPTION,
                    repository.getURI()
                };

                result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );

                if ( !result.isSuccess() )
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

                anonymousAccessGit( gitRepo );
            }
            else if ( anonymousRepository != null && isScmSystem( anonymousRepository, "hg" ) )
            {
                HgScmProviderRepository hgRepo = (HgScmProviderRepository) anonymousRepository
                    .getProviderRepository();

                anonymousAccessMercurial( hgRepo );
            }
            else if ( anonymousRepository != null && isScmSystem( anonymousRepository, "svn" ) )
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

                developerAccessGit( gitRepo );
            }
            else if ( devRepository != null && isScmSystem( devRepository, "hg" ) )
            {
                HgScmProviderRepository hgRepo = (HgScmProviderRepository) devRepository.getProviderRepository();

                developerAccessMercurial( hgRepo );
            }
            else if ( devRepository != null && isScmSystem( devRepository, "perforce" ) )
            {
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

                return result;
            }

        }

        result.repository = new HgScmProviderRepository( url );

        return result;
    }
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

            {
            }
        };

        ScmResult result = HgUtils.execute( branchConsumer, getLogger(), workingDir, branchCmd );
        HgScmProviderRepository repository = (HgScmProviderRepository) scmProviderRepository;

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Error while executing command " + joinCmd( branchCmd ) );
        }

        // First commit.
        String[] commitCmd = new String[]{ HgCommandConstants.COMMIT_CMD, HgCommandConstants.MESSAGE_OPTION, scmBranchParameters.getMessage() };


        result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), workingDir, commitCmd );

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Error while executing command " + joinCmd( commitCmd ) );
        }

        // now push, if we should.

        if ( repository.isPushChanges() )
        {
            if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
            {

                String[] pushCmd = new String[] {
                    HgCommandConstants.PUSH_CMD,
                    HgCommandConstants.NEW_BRANCH_OPTION,
                    repository.getURI()
                };

                result = HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );

                if ( !result.isSuccess() )
View Full Code Here

Examples of org.apache.maven.scm.provider.hg.repository.HgScmProviderRepository

        // keep the command about in string form for reporting
        StringBuffer cmd = joinCmd( tagCmd );
        HgTagConsumer consumer = new HgTagConsumer( getLogger() );
        ScmResult result = HgUtils.execute( consumer, getLogger(), workingDir, tagCmd );
        HgScmProviderRepository repository = (HgScmProviderRepository) scmProviderRepository;
        if ( result.isSuccess() )
        {
            // now push
            // Push to parent branch if any

            if ( repository.isPushChanges() )
            {
                if ( !repository.getURI().equals( fileSet.getBasedir().getAbsolutePath() ) )
                {
                    String branchName = HgUtils.getCurrentBranchName( getLogger(), workingDir );
                    boolean differentOutgoingBranch =
                        HgUtils.differentOutgoingBranchFound( getLogger(), workingDir, branchName );

                    String[] pushCmd = new String[]{ HgCommandConstants.PUSH_CMD,
                        differentOutgoingBranch ? HgCommandConstants.REVISION_OPTION + branchName : null,
                        repository.getURI() };

                    result =
                        HgUtils.execute( new HgConsumer( getLogger() ), getLogger(), fileSet.getBasedir(), pushCmd );
                }
            }
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.