@Test public void testStatBackingStream() throws Exception { AccuRevCommandLineTester accuRevCL = new AccuRevCommandLineTester(); File basedir = new File( "/my/workspace" ); List<File> elements = new ArrayList<File>( 1 ); File addedOrModifiedFile = new File( "addedOrModified/file" ); elements.add( addedOrModifiedFile ); accuRevCL.statBackingStream( basedir, elements ); Commandline lastCL = accuRevCL.getCommandline(); assertThat( lastCL.getWorkingDirectory(), is( basedir.getCanonicalFile() ) ); assertThat( lastCL.getArguments(), is( new String[] { "stat", "-b", "-ffr", addedOrModifiedFile.getPath() } ) ); }
public CategorisedElements statBackingStream( File basedir, Collection<File> elements ) throws AccuRevException { CategorisedElements catElems = new CategorisedElements(); if ( elements.isEmpty() ) { return catElems; } String[] args = { "stat", "-b", "-ffr" }; boolean ret = executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(), catElems.getNonMemberElements() ) ); return ret ? catElems : null; }
AccuRevCommandLine implements AccuRev { public CategorisedElements statBackingStream( File basedir, Collection<File> elements ) throws AccuRevException { CategorisedElements catElems = new CategorisedElements(); if ( elements.isEmpty() ) { return catElems; } String[] args = { "stat", "-b", "-ffr" }; boolean ret = executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(), catElems.getNonMemberElements() ) ); return ret ? catElems : null; } }
AccuRevCommandLine implements AccuRev { public CategorisedElements statBackingStream( File basedir, Collection<File> elements ) throws AccuRevException { CategorisedElements catElems = new CategorisedElements(); if ( elements.isEmpty() ) { return catElems; } String[] args = { "stat", "-b", "-ffr" }; boolean ret = executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(), catElems.getNonMemberElements() ) ); return ret ? catElems : null; } AccuRevCommandLine();  AccuRevCommandLine( String host, int port ); }
AccuRevCommandLine implements AccuRev { public CategorisedElements statBackingStream( File basedir, Collection<File> elements ) throws AccuRevException { CategorisedElements catElems = new CategorisedElements(); if ( elements.isEmpty() ) { return catElems; } String[] args = { "stat", "-b", "-ffr" }; boolean ret = executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(), catElems.getNonMemberElements() ) ); return ret ? catElems : 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 CategorisedElements statBackingStream( File basedir, Collection<File> elements ) throws AccuRevException { CategorisedElements catElems = new CategorisedElements(); if ( elements.isEmpty() ) { return catElems; } String[] args = { "stat", "-b", "-ffr" }; boolean ret = executeCommandLine( basedir, args, elements, new StatBackingConsumer( catElems.getMemberElements(), catElems.getNonMemberElements() ) ); return ret ? catElems : 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();  }