Package org.apache.maven.scm.command.remove

Examples of org.apache.maven.scm.command.remove.RemoveScmResult


        setCheckInScmResult( new CheckInScmResult( "", "", "", true ) );
        setCheckOutScmResult( new CheckOutScmResult( "", "", "", true ) );
        setDiffScmResult( new DiffScmResult( "", "", "", true ) );
        setEditScmResult( new EditScmResult( "", "", "", true ) );
        setExportScmResult( new ExportScmResult( "", "", "", true ) );
        setRemoveScmResult( new RemoveScmResult( "", "", "", true ) );
        setStatusScmResult( new StatusScmResult( "", "", "", true ) );
        setTagScmResult( new TagScmResult( "", "", "", true ) );
        setUnEditScmResult( new UnEditScmResult( "", "", "", true ) );
        setUpdateScmResult( new UpdateScmResult( "", "", "", true ) );
        setBlameScmResult( new BlameScmResult( "", "", "", true ) );
View Full Code Here


        newBarDir.mkdir();
        File movedWineFile = new File(newBarDir.getAbsolutePath() + File.separator + "wine.xml");
        FileUtils.copyFile(wineFile, movedWineFile);

        // Removing old file, adding new file and commiting...
        RemoveScmResult removeResult = getScmManager().remove(scmRepository, new ScmFileSet(checkedOutRepo, new File("foo/bar/")), "");
        assertResultIsSuccess(removeResult);
        addResult = getScmManager().add(scmRepository, new ScmFileSet(checkedOutRepo, new File("foo/newbar/wine.xml")));
        assertResultIsSuccess(addResult);
        checkInScmResult = getScmManager().checkIn(scmRepository, new ScmFileSet(checkedOutRepo), "moved wine.xml from foo/bar/ to foo/newbar/");
        assertResultIsSuccess(checkInScmResult);
View Full Code Here

                                                              cl.getWorkingDirectory().getAbsolutePath(), logListener,
                                                              getLogger() );

            if ( !isSuccess )
            {
                return new RemoveScmResult( cl.toString(), "The cvs command failed.",
                                            logListener.getStderr().toString(), false );
            }
            BufferedReader stream = new BufferedReader(
                new InputStreamReader( new ByteArrayInputStream( logListener.getStdout().toString().getBytes() ) ) );

            if ( getLogger().isDebugEnabled() )
            {
                String line;
                while ( ( line = stream.readLine() ) != null )
                {
                    getLogger().debug( line );
                }
            }
        }
        catch ( Exception e )
        {
            e.printStackTrace();
            return new RemoveScmResult( cl.toString(), "The cvs command failed.", logListener.getStderr().toString(),
                                        false );
        }

        return new RemoveScmResult( cl.toString(), removedFiles );
    }
View Full Code Here

        int exitCode;

        exitCode = GitCommandLineUtils.execute( cl, consumer, stderr, getLogger() );
        if ( exitCode != 0 )
        {
            return new RemoveScmResult( cl.toString(), "The git command failed.", stderr.getOutput(), false );
        }

        return new RemoveScmResult( cl.toString(), consumer.getRemovedFiles() );
    }
View Full Code Here

        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );

        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );

        assertThat( result.isSuccess(), is( true ) );
        assertThat( result.getRemovedFiles().size(), is( 1 ) );
        assertHasScmFile( result.getRemovedFiles(), "removed/file", ScmFileStatus.DELETED );
    }
View Full Code Here

        AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() );

        CommandParameters commandParameters = new CommandParameters();
        commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" );
        RemoveScmResult result = command.remove( repo, testFileSet, commandParameters );

        assertThat( result.isSuccess(), is( false ) );
        assertThat( result.getProviderMessage(), notNullValue() );
    }
View Full Code Here

    {
        super.execute();
        try
        {
            ScmRepository repository = getScmRepository();
            RemoveScmResult result = getScmManager().remove( repository, getFileSet(), message );
            checkResult( result );
        }
        catch ( IOException e )
        {
            throw new MojoExecutionException( "Cannot run remove command : " + e.getMessage(), e );
View Full Code Here

        final List<File> removedFiles = accuRev.defunct( basedir, relativeFiles, message );

        if ( removedFiles != null )
        {
            List<ScmFile> resultFiles = getScmFiles( removedFiles, ScmFileStatus.DELETED );
            return new RemoveScmResult( accuRev.getCommandLines(), resultFiles );
        }
        else
        {
            return new RemoveScmResult( accuRev.getCommandLines(), "AccuRev Error", accuRev.getErrorOutput(), false );
        }
    }
View Full Code Here

        {
            throw new ScmException( "CommandLineException " + e.getMessage(), e );

        }

        return new RemoveScmResult( cl.toString(), consumer.getRemovals() );
    }
View Full Code Here

        File workingDir = fileSet.getBasedir();
        BazaarRemoveConsumer consumer = new BazaarRemoveConsumer( getLogger(), workingDir );

        ScmResult result = BazaarUtils.execute( consumer, getLogger(), workingDir, command );
        return new RemoveScmResult( consumer.getRemovedFiles(), result );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.command.remove.RemoveScmResult

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.