@Test public void testDiff() throws Exception { AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester(); accuRevCL.diff( "myStream", "fromSpec", "toSpec" ); Commandline lastCL = accuRevCL.getCommandline(); assertThat( lastCL.getArguments(), is( new String[] { "diff", "-fx", "-a", "-i", "-v", "myStream", "-V", "myStream", "-t", "fromSpec-toSpec" } ) ); }
public List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ) throws AccuRevException { String timeSpec = fromTimeSpec + "-" + toTimeSpec; String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec }; List<FileDifference> results = new ArrayList<FileDifference>(); DiffConsumer stdout = new DiffConsumer( getLogger(), results ); return executeCommandLine( diff, null, stdout ) < 2 ? results : null; }
AccuRevCommandLine implements AccuRev { public List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ) throws AccuRevException { String timeSpec = fromTimeSpec + "-" + toTimeSpec; String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec }; List<FileDifference> results = new ArrayList<FileDifference>(); DiffConsumer stdout = new DiffConsumer( getLogger(), results ); return executeCommandLine( diff, null, stdout ) < 2 ? results : null; } }
AccuRevCommandLine implements AccuRev { public List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ) throws AccuRevException { String timeSpec = fromTimeSpec + "-" + toTimeSpec; String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec }; List<FileDifference> results = new ArrayList<FileDifference>(); DiffConsumer stdout = new DiffConsumer( getLogger(), results ); return executeCommandLine( diff, null, stdout ) < 2 ? results : null; } AccuRevCommandLine();  AccuRevCommandLine( String host, int port ); }
AccuRevCommandLine implements AccuRev { public List<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ) throws AccuRevException { String timeSpec = fromTimeSpec + "-" + toTimeSpec; String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec }; List<FileDifference> results = new ArrayList<FileDifference>(); DiffConsumer stdout = new DiffConsumer( getLogger(), results ); return executeCommandLine( diff, null, stdout ) < 2 ? results : 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<FileDifference> diff( String baseStream, String fromTimeSpec, String toTimeSpec ) throws AccuRevException { String timeSpec = fromTimeSpec + "-" + toTimeSpec; String[] diff = { "diff", "-fx", "-a", "-i", "-v", baseStream, "-V", baseStream, "-t", timeSpec }; List<FileDifference> results = new ArrayList<FileDifference>(); DiffConsumer stdout = new DiffConsumer( getLogger(), results ); return executeCommandLine( diff, null, stdout ) < 2 ? results : 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();  }