Version Differences for Remoting Specific Scripts

(AHPSCRIPTS-87)
(AHPSCRIPTS-100)
Line 1401:
       
  uow.close();</pre>    uow.close();</pre> 
       
    + = Change All SVN Populate Workspace Steps to Use Export Instead of Checkout =  
    + * Anthill 3.7.0 introduced the ability to do a svn export instead of a checkout which can offer a space and time savings. A remote script can find and change all the existing steps to use this.  
    + ==== AHPSCRIPTS-106 ====  
    + <pre>import com.urbancode.anthill3.main.client.AnthillClient;  
    + import com.urbancode.anthill3.persistence.UnitOfWork;  
    + import com.urbancode.anthill3.domain.jobconfig.*;  
    + import com.urbancode.anthill3.domain.source.svn.*;  
    + import com.urbancode.anthill3.domain.step.*;  
       
    + String serverHost = "anthill3.mycompany.com";  
    + int serverPort = 4567;  
    + String userName = "admin";  
    + String password = "admin";  
       
    + // obtain connection to the Anthill server  
    + AnthillClient anthill = AnthillClient.connect(serverHost, serverPort, userName, password);  
       
    + // create a Unit of Work  
    + UnitOfWork uow = anthill.createUnitOfWork();  
       
    + for (JobConfig jobConfig : JobConfigFactory.getInstance().restoreAll()) {  
    + for (StepConfig stepConfig : jobConfig.getStepConfigArray()) {  
    + if (stepConfig instanceof SvnPopulateWorkspaceStepConfig) {  
    + SvnPopulateWorkspaceStepConfig svnPopulate = (SvnPopulateWorkspaceStepConfig) stepConfig;  
    + System.out.println("SVN Populate found on job " + jobConfig.getName() + " (" + jobConfig.getId() +  
    + ") as step " + stepConfig.getName());  
    + svnPopulate.setUseExport(true);  
    + }  
    + }  
    + }  
       
    + uow.commitAndClose();</pre>