maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1056991 - in /maven/scm/trunk/maven-scm-providers: maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/ maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/stat...
Date Sun, 09 Jan 2011 18:09:11 GMT
Author: olamy
Date: Sun Jan  9 18:09:10 2011
New Revision: 1056991

URL: http://svn.apache.org/viewvc?rev=1056991&view=rev
Log:
[SCM-591] Move to Java 1.5 : status command

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/status/ClearCaseStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/status/LocalStatusCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-synergy/src/main/java/org/apache/maven/scm/provider/synergy/command/status/SynergyStatusCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsStatusCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/consumer/ChangedFileConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/status/SvnStatusConsumer.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -35,7 +35,7 @@ import java.util.List;
 class BazaarStatusConsumer
     extends BazaarConsumer
 {
-    private final List repositoryStatus = new ArrayList();
+    private final List<ScmFile> repositoryStatus = new ArrayList<ScmFile>();
 
     private final File workingDir;
 
@@ -91,7 +91,7 @@ class BazaarStatusConsumer
         }
     }
 
-    List getStatus()
+    List<ScmFile> getStatus()
     {
         return repositoryStatus;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/status/ClearCaseStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/status/ClearCaseStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/status/ClearCaseStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/status/ClearCaseStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -39,7 +39,7 @@ public class ClearCaseStatusConsumer
 
     private File workingDirectory;
 
-    private List checkedOutFiles = new ArrayList();
+    private List<ScmFile> checkedOutFiles = new ArrayList<ScmFile>();
 
     // ----------------------------------------------------------------------
     //
@@ -70,7 +70,7 @@ public class ClearCaseStatusConsumer
     //
     // ----------------------------------------------------------------------
 
-    public List getCheckedOutFiles()
+    public List<ScmFile> getCheckedOutFiles()
     {
         return checkedOutFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -35,7 +35,7 @@ import java.util.List;
 class HgStatusConsumer
     extends HgConsumer
 {
-    private final List repositoryStatus = new ArrayList();
+    private final List<ScmFile> repositoryStatus = new ArrayList<ScmFile>();
 
     private final File workingDir;
 
@@ -75,7 +75,7 @@ class HgStatusConsumer
         }
     }
 
-    List getStatus()
+    List<ScmFile> getStatus()
     {
         return repositoryStatus;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/status/LocalStatusCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/status/LocalStatusCommand.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/status/LocalStatusCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/status/LocalStatusCommand.java
Sun Jan  9 18:09:10 2011
@@ -19,14 +19,15 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
+import java.util.Collections;
+
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.status.AbstractStatusCommand;
 import org.apache.maven.scm.command.status.StatusScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.local.command.LocalCommand;
-import java.util.List;
-import java.util.Collections;
 
 /**
  * @author <a href="mailto:matthewm@ambientideas.com">Matthew McCullough</a>
@@ -40,7 +41,6 @@ public class LocalStatusCommand
     protected StatusScmResult executeStatusCommand( ScmProviderRepository repository, ScmFileSet
fileSet)
         throws ScmException
     {
-        List fileList = Collections.EMPTY_LIST;
-        return new StatusScmResult( null, fileList );
+        return new StatusScmResult( null, Collections.<ScmFile>emptyList() );
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java
Sun Jan  9 18:09:10 2011
@@ -60,7 +60,7 @@ public class PerforceStatusCommand
 
         if ( consumer.isSuccess() )
         {
-            List scmfiles = createResults( actualLocation, consumer );
+            List<ScmFile> scmfiles = createResults( actualLocation, consumer );
             return new StatusScmResult( command.toString(), scmfiles );
         }
 
@@ -68,14 +68,14 @@ public class PerforceStatusCommand
                 .getOutput(), consumer.isSuccess() );
     }
 
-    public static List createResults( String repoPath, PerforceStatusConsumer consumer )
+    public static List<ScmFile> createResults( String repoPath, PerforceStatusConsumer
consumer )
     {
-        List results = new ArrayList();
-        List files = consumer.getDepotfiles();
+        List<ScmFile> results = new ArrayList<ScmFile>();
+        List<String> files = consumer.getDepotfiles();
         RE re = new RE( "([^#]+)#\\d+ - ([^ ]+) .*" );
-        for ( Iterator it = files.iterator(); it.hasNext(); )
+        for ( Iterator<String> it = files.iterator(); it.hasNext(); )
         {
-            String filepath = (String) it.next();
+            String filepath = it.next();
             if ( !re.match( filepath ) )
             {
                 System.err.println( "Skipping " + filepath );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/status/PerforceStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -40,7 +40,7 @@ public class PerforceStatusConsumer
 
     private int currentState = STATE_FILES;
 
-    private List depotfiles = new ArrayList();
+    private List<String> depotfiles = new ArrayList<String>();
 
     /** {@inheritDoc} */
     public void consumeLine( String line )
@@ -79,7 +79,7 @@ public class PerforceStatusConsumer
         return currentState != STATE_ERROR;
     }
 
-    public List getDepotfiles()
+    public List<String> getDepotfiles()
     {
         return depotfiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -39,7 +39,7 @@ public class StarteamStatusConsumer
 
     private String workingDirectory;
 
-    private List changedFiles = new ArrayList();
+    private List<ScmFile> changedFiles = new ArrayList<ScmFile>();
 
     /**
      * Marks current directory data
@@ -177,7 +177,7 @@ public class StarteamStatusConsumer
         }
     }
 
-    public List getChangedFiles()
+    public List<ScmFile> getChangedFiles()
     {
         return changedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-synergy/src/main/java/org/apache/maven/scm/provider/synergy/command/status/SynergyStatusCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-synergy/src/main/java/org/apache/maven/scm/provider/synergy/command/status/SynergyStatusCommand.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-synergy/src/main/java/org/apache/maven/scm/provider/synergy/command/status/SynergyStatusCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-synergy/src/main/java/org/apache/maven/scm/provider/synergy/command/status/SynergyStatusCommand.java
Sun Jan  9 18:09:10 2011
@@ -60,7 +60,7 @@ public class SynergyStatusCommand
 
         String ccmAddr = SynergyUtil.start( getLogger(), repo.getUser(), repo.getPassword(),
null );
 
-        List l;
+        List<String> l;
         try
         {
             l = SynergyUtil.getWorkingFiles( getLogger(), repo.getProjectSpec(), repo.getProjectRelease(),
ccmAddr );
@@ -70,11 +70,11 @@ public class SynergyStatusCommand
             SynergyUtil.stop( getLogger(), ccmAddr );
         }
 
-        List result = new LinkedList();
-        for ( Iterator i = l.iterator(); i.hasNext(); )
+        List<ScmFile> result = new LinkedList<ScmFile>();
+        for ( Iterator<String> i = l.iterator(); i.hasNext(); )
         {
 
-            ScmFile f = new ScmFile( (String) i.next(), ScmFileStatus.MODIFIED );
+            ScmFile f = new ScmFile( i.next(), ScmFileStatus.MODIFIED );
             result.add( f );
         }
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsStatusCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsStatusCommand.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsStatusCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsStatusCommand.java
Sun Jan  9 18:09:10 2011
@@ -50,7 +50,7 @@ public class TfsStatusCommand
             return new StatusScmResult( command.getCommandString(), "Error code for TFS status
command - " + status,
                                         err.getOutput(), false );
         }
-        Iterator iter = out.getChangedFiles().iterator();
+        Iterator<ScmFile> iter = out.getChangedFiles().iterator();
         getLogger().debug( "Iterating" );
         while ( iter.hasNext() )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/consumer/ChangedFileConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/consumer/ChangedFileConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/consumer/ChangedFileConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/consumer/ChangedFileConsumer.java
Sun Jan  9 18:09:10 2011
@@ -22,11 +22,11 @@ package org.apache.maven.scm.provider.tf
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 
 public class ChangedFileConsumer
@@ -43,9 +43,9 @@ public class ChangedFileConsumer
 
     private static final String CHANGE_ADD = "add";
 
-    private HashMap values = new HashMap();
+    private Map<String,String> values = new HashMap<String,String>();
 
-    private ArrayList changedFiles = new ArrayList();
+    private List<ScmFile> changedFiles = new ArrayList<ScmFile>();
 
     public ChangedFileConsumer( ScmLogger logger )
     {
@@ -82,7 +82,7 @@ public class ChangedFileConsumer
         }
     }
 
-    public List getChangedFiles()
+    public List<ScmFile> getChangedFiles()
     {
         if ( values.size() > 0 )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusCommand.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusCommand.java
Sun Jan  9 18:09:10 2011
@@ -73,12 +73,7 @@ public class VssStatusCommand
             {
                 getLogger().debug( "VSS returns error: [" + error + "] return code: [" +
exitCode + "]" );
             }
-            if ( false )
-            {
-                return new StatusScmResult( cl.toString(), "The vss command failed.", error,
false );
-            }
-            // print out the writable copy for manual handling
-            //            getLogger().warn(error);
+            return new StatusScmResult( cl.toString(), "The vss command failed.", error,
false );
         }
 
         return new StatusScmResult( cl.toString(), consumer.getUpdatedFiles() );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/status/VssStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -100,10 +100,12 @@ public class VssStatusConsumer
 
     private int lastState = 0;
 
-    private List updatedFiles = new ArrayList();
+    private List<ScmFile> updatedFiles = new ArrayList<ScmFile>();
 
+    @SuppressWarnings( "unused" )
     private VssScmProviderRepository repo;
 
+    @SuppressWarnings( "unused" )
     private ScmFileSet fileSet;
 
     public VssStatusConsumer( VssScmProviderRepository repo, ScmLogger logger, ScmFileSet
fileSet )
@@ -265,7 +267,7 @@ public class VssStatusConsumer
         return argument;
     }
 
-    public List getUpdatedFiles()
+    public List<ScmFile> getUpdatedFiles()
     {
         return updatedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/status/SvnStatusConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/status/SvnStatusConsumer.java?rev=1056991&r1=1056990&r2=1056991&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/status/SvnStatusConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/status/SvnStatusConsumer.java
Sun Jan  9 18:09:10 2011
@@ -40,7 +40,7 @@ public class SvnStatusConsumer
 
     private File workingDirectory;
 
-    private List changedFiles = new ArrayList();
+    private List<ScmFile> changedFiles = new ArrayList<ScmFile>();
 
     // ----------------------------------------------------------------------
     //
@@ -193,7 +193,7 @@ public class SvnStatusConsumer
         changedFiles.add( new ScmFile( file, status ) );
     }
 
-    public List getChangedFiles()
+    public List<ScmFile> getChangedFiles()
     {
         return changedFiles;
     }



Mime
View raw message