@Test public void testPromoteAll() throws Exception { AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester(); assertThat( accuRevCL.promoteAll( new File( "/my/workspace" ), "cmt msg" ), not( nullValue() ) ); Commandline lastCL = accuRevCL.getCommandline(); assertThat( lastCL.getWorkingDirectory(), is( new File( "/my/workspace" ).getCanonicalFile() ) ); assertThat( lastCL.getArguments(), is( new String[] { "promote", "-p", "-K", "-c", "cmt msg" } ) ); }
public List<File> promoteAll( File baseDir, String commitMessage ) throws AccuRevException { setWorkingDirectory( baseDir ); String[] promote = { "promote", "-p", "-K", "-c", commitMessage }; List<File> promotedFiles = new ArrayList<File>(); int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) ); return ret == 0 ? promotedFiles : null; }
AccuRevCommandLine implements AccuRev { public List<File> promoteAll( File baseDir, String commitMessage ) throws AccuRevException { setWorkingDirectory( baseDir ); String[] promote = { "promote", "-p", "-K", "-c", commitMessage }; List<File> promotedFiles = new ArrayList<File>(); int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) ); return ret == 0 ? promotedFiles : null; } }
AccuRevCommandLine implements AccuRev { public List<File> promoteAll( File baseDir, String commitMessage ) throws AccuRevException { setWorkingDirectory( baseDir ); String[] promote = { "promote", "-p", "-K", "-c", commitMessage }; List<File> promotedFiles = new ArrayList<File>(); int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) ); return ret == 0 ? promotedFiles : null; } AccuRevCommandLine();  AccuRevCommandLine( String host, int port ); }
AccuRevCommandLine implements AccuRev { public List<File> promoteAll( File baseDir, String commitMessage ) throws AccuRevException { setWorkingDirectory( baseDir ); String[] promote = { "promote", "-p", "-K", "-c", commitMessage }; List<File> promotedFiles = new ArrayList<File>(); int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) ); return ret == 0 ? promotedFiles : null; } AccuRevCommandLine();  AccuRevCommandLine( String host, int port ); void setServer( String host, int port ); void setExecutable( String accuRevExe ); void reset(); boolean mkws( String basisStream, String workspaceName, File basedir ); List<File> update( File baseDir, String transactionId ); List<File> add( File basedir, List<File> elements, String message ); List<File> defunct( File basedir, List<File> files, String message ); List<File> promote( File basedir, List<File> files, String message ); String getCommandLines(); String getErrorOutput(); void setLogger( ScmLogger logger ); ScmLogger getLogger(); boolean mkdepot( String depotName ); boolean mkstream( String backingStream, String newStreamName ); boolean promoteStream( String subStream, String commitMessage, List<File> promotedFiles ); List<File> promoteAll( File baseDir, String commitMessage ); AccuRevInfo info( File basedir ); boolean reactivate( String workSpaceName ); boolean rmws( String workSpaceName ); String stat( File element ); boolean chws( File basedir, String workSpaceName, String newBasisStream ); boolean mksnap( String snapShotName, String basisStream ); List<File> statTag( String streamName ); List<File> stat( File basedir, Collection<File> elements, AccuRevStat statType ); List<File> pop( File basedir, Collection<File> elements ); List<File> popExternal( File basedir, String versionSpec, String tranSpec, Collection<File> elements ); CategorisedElements statBackingStream( File basedir, Collection<File> elements ); List<Transaction> history( String baseStream, String fromTimeSpec, String toTimeSpec, int count,
                                      boolean depotHistory, boolean transactionsOnly ); List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ); boolean login( String user, String password ); boolean logout(); List<BlameLine> annotate( File basedir, File file ); Map<String, WorkSpace> showRefTrees(); Map<String, WorkSpace> showWorkSpaces(); Stream showStream( String stream ); String getExecutable(); String getClientVersion(); boolean syncReplica(); }
AccuRevCommandLine implements AccuRev { public List<File> promoteAll( File baseDir, String commitMessage ) throws AccuRevException { setWorkingDirectory( baseDir ); String[] promote = { "promote", "-p", "-K", "-c", commitMessage }; List<File> promotedFiles = new ArrayList<File>(); int ret = executeCommandLine( promote, null, new FileConsumer( promotedFiles, FileConsumer.PROMOTE_PATTERN ) ); return ret == 0 ? promotedFiles : null; } AccuRevCommandLine();  AccuRevCommandLine( String host, int port ); void setServer( String host, int port ); void setExecutable( String accuRevExe ); void reset(); boolean mkws( String basisStream, String workspaceName, File basedir ); List<File> update( File baseDir, String transactionId ); List<File> add( File basedir, List<File> elements, String message ); List<File> defunct( File basedir, List<File> files, String message ); List<File> promote( File basedir, List<File> files, String message ); String getCommandLines(); String getErrorOutput(); void setLogger( ScmLogger logger ); ScmLogger getLogger(); boolean mkdepot( String depotName ); boolean mkstream( String backingStream, String newStreamName ); boolean promoteStream( String subStream, String commitMessage, List<File> promotedFiles ); List<File> promoteAll( File baseDir, String commitMessage ); AccuRevInfo info( File basedir ); boolean reactivate( String workSpaceName ); boolean rmws( String workSpaceName ); String stat( File element ); boolean chws( File basedir, String workSpaceName, String newBasisStream ); boolean mksnap( String snapShotName, String basisStream ); List<File> statTag( String streamName ); List<File> stat( File basedir, Collection<File> elements, AccuRevStat statType ); List<File> pop( File basedir, Collection<File> elements ); List<File> popExternal( File basedir, String versionSpec, String tranSpec, Collection<File> elements ); CategorisedElements statBackingStream( File basedir, Collection<File> elements ); List<Transaction> history( String baseStream, String fromTimeSpec, String toTimeSpec, int count,
                                      boolean depotHistory, boolean transactionsOnly ); List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ); boolean login( String user, String password ); boolean logout(); List<BlameLine> annotate( File basedir, File file ); Map<String, WorkSpace> showRefTrees(); Map<String, WorkSpace> showWorkSpaces(); Stream showStream( String stream ); String getExecutable(); String getClientVersion(); boolean syncReplica();  }