maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1056938 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/ maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/ maven-scm-providers/maven-scm-...
Date Sun, 09 Jan 2011 14:27:54 GMT
Author: olamy
Date: Sun Jan  9 14:27:54 2011
New Revision: 1056938

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

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/remove/HgRemoveConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/remove/AbstractCvsRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/remove/CvsExeRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/remove/CvsJavaRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveConsumer.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/remove/SvnRemoveCommand.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/remove/SvnRemoveConsumer.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
Sun Jan  9 14:27:54 2011
@@ -19,39 +19,43 @@ package org.apache.maven.scm.command.rem
  * under the License.
  */
 
-import org.apache.maven.scm.ScmResult;
-
 import java.util.List;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmResult;
+
 /**
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class RemoveScmResult
     extends ScmResult
 {
-    private List removedFiles;
+
+    private static final long serialVersionUID = 8852310735079996771L;
+    private List<ScmFile> removedFiles;
 
     public RemoveScmResult( String commandLine, String providerMessage, String commandOutput,
boolean success )
     {
         super( commandLine, providerMessage, commandOutput, success );
     }
 
-    public RemoveScmResult( String commandLine, List removedFiles )
+    public RemoveScmResult( String commandLine, List<ScmFile> removedFiles )
     {
         super( commandLine, null, null, true );
 
         this.removedFiles = removedFiles;
     }
 
-    public RemoveScmResult( List removedFiles, ScmResult result )
+    public RemoveScmResult( List<ScmFile> removedFiles, ScmResult result )
     {
         super( result );
 
         this.removedFiles = removedFiles;
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveCommand.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/remove/BazaarRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -32,7 +32,7 @@ import org.apache.maven.scm.provider.baz
 import org.apache.maven.scm.provider.bazaar.command.BazaarConstants;
 
 /**
- * @author <a href="mailto:torbjorn@smorgrav.org">Torbj�rn Eikli Sm�rgrav</a>
+ * @author <a href="mailto:torbjorn@smorgrav.org">Torbjorn Eikli Smorgrav</a>
  * @version $Id$
  */
 public class BazaarRemoveCommand

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveConsumer.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/remove/BazaarRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/remove/BazaarRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -29,7 +29,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * @author <a href="mailto:torbjorn@smorgrav.org">Torbj�rn Eikli Sm�rgrav</a>
+ * @author <a href="mailto:torbjorn@smorgrav.org">Torbjorn Eikli Smorgrav</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class BazaarRemoveConsumer
@@ -37,7 +38,7 @@ public class BazaarRemoveConsumer
 {
     private final File workingDir;
 
-    private final List removedFiles = new ArrayList();
+    private final List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
     public BazaarRemoveConsumer( ScmLogger logger, File workingDir )
     {
@@ -71,7 +72,7 @@ public class BazaarRemoveConsumer
         }
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveCommand.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/remove/ClearCaseRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -19,6 +19,9 @@ package org.apache.maven.scm.provider.cl
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
@@ -32,10 +35,9 @@ import org.codehaus.plexus.util.cli.Comm
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.io.File;
-
 /**
  * @author <a href="mailto:wim.deblauwe@gmail.com">Wim Deblauwe</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class ClearCaseRemoveCommand
@@ -135,10 +137,9 @@ public class ClearCaseRemoveCommand
 
         command.createArg().setValue( "-nc" );
 
-        File[] files = scmFileSet.getFiles();
-        for ( int i = 0; i < files.length; i++ )
+        List<File> files = scmFileSet.getFileList();
+        for ( File file : files )
         {
-            File file = files[i];
             if ( logger.isInfoEnabled() )
             {
                 logger.info( "Deleting file: " + file.getAbsolutePath() );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveConsumer.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/remove/ClearCaseRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/remove/ClearCaseRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -29,6 +29,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:wim.deblauwe@gmail.com">Wim Deblauwe</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class ClearCaseRemoveConsumer
@@ -36,7 +37,7 @@ public class ClearCaseRemoveConsumer
 {
     private ScmLogger logger;
 
-    private List removedFiles = new ArrayList();
+    private List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
     // ----------------------------------------------------------------------
     //
@@ -70,7 +71,7 @@ public class ClearCaseRemoveConsumer
     //
     // ----------------------------------------------------------------------
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/remove/HgRemoveConsumer.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/remove/HgRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/remove/HgRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/remove/HgRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -30,6 +30,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:thurner.rupert@ymono.net">thurner rupert</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class HgRemoveConsumer
@@ -37,7 +38,7 @@ public class HgRemoveConsumer
 {
     private final File workingDir;
 
-    private final List removedFiles = new ArrayList();
+    private final List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
     public HgRemoveConsumer( ScmLogger logger, File workingDir )
     {
@@ -71,7 +72,7 @@ public class HgRemoveConsumer
         }
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveCommand.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/remove/PerforceRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -37,6 +37,7 @@ import java.util.List;
 
 /**
  * @author Mike Perham
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class PerforceRemoveCommand
@@ -58,7 +59,7 @@ public class PerforceRemoveCommand
             {
                 String cmdLine = CommandLineUtils.toString( cl.getCommandline() );
 
-                StringBuffer msg = new StringBuffer( "Exit code: " + exitCode + " - " + err.getOutput()
);
+                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " +
err.getOutput() );
                 msg.append( '\n' );
                 msg.append( "Command line was:" + cmdLine );
 
@@ -82,7 +83,7 @@ public class PerforceRemoveCommand
         Commandline command = PerforceScmProvider.createP4Command( repo, workingDirectory
);
         command.createArg().setValue( "delete" );
 
-        List fs = files.getFileList();
+        List<File> fs = files.getFileList();
         for ( int i = 0; i < fs.size(); i++ )
         {
             File file = (File) fs.get( i );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveConsumer.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/remove/PerforceRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/remove/PerforceRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -19,18 +19,20 @@ package org.apache.maven.scm.provider.pe
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.provider.perforce.command.AbstractPerforceConsumer;
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * @author Mike Perham
- * @version $Id: PerforceChangeLogConsumer.java 331276 2005-11-07 15:04:54Z
- *          evenisse $
+ * @author Olivier Lamy
+ * @version $Id$
  */
 public class PerforceRemoveConsumer
     extends AbstractPerforceConsumer
@@ -40,7 +42,7 @@ public class PerforceRemoveConsumer
 
     private static final String PATTERN = "^([^#]+)#\\d+ - (.*)";
 
-    private List removals = new ArrayList();
+    private List<ScmFile> removals = new ArrayList<ScmFile>();
 
     private RE revisionRegexp;
 
@@ -58,7 +60,7 @@ public class PerforceRemoveConsumer
         }
     }
 
-    public List getRemovals()
+    public List<ScmFile> getRemovals()
     {
         return removals;
     }
@@ -81,7 +83,7 @@ public class PerforceRemoveConsumer
             error( line );
         }
 
-        removals.add( revisionRegexp.getParen( 1 ) );
+        removals.add( new ScmFile(revisionRegexp.getParen( 1 ), ScmFileStatus.DELETED ) );
     }
 
     private void error( String line )

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveCommand.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/remove/StarteamRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -37,6 +37,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class StarteamRemoveCommand
@@ -58,7 +59,7 @@ public class StarteamRemoveCommand
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 
-        List remvoveFiles = fileSet.getFileList();
+        List<File> remvoveFiles = fileSet.getFileList();
 
         if ( remvoveFiles.size() == 0 )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/remove/AbstractCvsRemoveCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/remove/AbstractCvsRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/remove/AbstractCvsRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/remove/AbstractCvsRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -38,6 +38,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @author Olivier Lamy
  * @version $Id$
  * @todo separate the CVSlib stuff from the cvs command line so it is clear what needs to
be updated eventually
  */
@@ -57,13 +58,13 @@ public abstract class AbstractCvsRemoveC
 
         cl.createArg().setValue( "-l" );
 
-        File[] files = fileSet.getFiles();
+        List<File> files = fileSet.getFileList();
 
-        List removedFiles = new ArrayList();
+        List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
-        for ( int i = 0; i < files.length; i++ )
+        for ( File file : files )
         {
-            String path = files[i].getPath().replace( '\\', '/' );
+            String path = file.getPath().replace( '\\', '/' );
 
             cl.createArg().setValue( path );
 
@@ -79,6 +80,6 @@ public abstract class AbstractCvsRemoveC
         return executeCvsCommand( cl, removedFiles );
     }
 
-    protected abstract RemoveScmResult executeCvsCommand( Commandline cl, List removedFiles
)
+    protected abstract RemoveScmResult executeCvsCommand( Commandline cl, List<ScmFile>
removedFiles )
         throws ScmException;
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/remove/CvsExeRemoveCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/remove/CvsExeRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/remove/CvsExeRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/remove/CvsExeRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -19,24 +19,26 @@ package org.apache.maven.scm.provider.cv
  * under the License.
  */
 
+import java.util.List;
+
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.command.remove.RemoveScmResult;
 import org.apache.maven.scm.provider.cvslib.command.remove.AbstractCvsRemoveCommand;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.util.List;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class CvsExeRemoveCommand
     extends AbstractCvsRemoveCommand
 {
     /** {@inheritDoc} */
-    protected RemoveScmResult executeCvsCommand( Commandline cl, List removedFiles )
+    protected RemoveScmResult executeCvsCommand( Commandline cl, List<ScmFile> removedFiles
)
         throws ScmException
     {
         CommandLineUtils.StringStreamConsumer consumer = new CommandLineUtils.StringStreamConsumer();

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/remove/CvsJavaRemoveCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/remove/CvsJavaRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/remove/CvsJavaRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/remove/CvsJavaRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -19,27 +19,29 @@ package org.apache.maven.scm.provider.cv
  * under the License.
  */
 
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.command.remove.RemoveScmResult;
 import org.apache.maven.scm.provider.cvslib.command.remove.AbstractCvsRemoveCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.util.CvsConnection;
 import org.apache.maven.scm.provider.cvslib.cvsjava.util.CvsLogListener;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class CvsJavaRemoveCommand
     extends AbstractCvsRemoveCommand
 {
     /** {@inheritDoc} */
-    protected RemoveScmResult executeCvsCommand( Commandline cl, List removedFiles )
+    protected RemoveScmResult executeCvsCommand( Commandline cl, List<ScmFile> removedFiles
)
         throws ScmException
     {
         CvsLogListener logListener = new CvsLogListener();

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -19,6 +19,9 @@ package org.apache.maven.scm.provider.gi
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
@@ -27,15 +30,12 @@ import org.apache.maven.scm.command.remo
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.git.command.GitCommand;
 import org.apache.maven.scm.provider.git.gitexe.command.GitCommandLineUtils;
-import org.apache.maven.scm.provider.git.repository.GitScmProviderRepository;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
-import java.io.File;
-import java.util.List;
-
 /**
  * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class GitRemoveCommand extends AbstractRemoveCommand implements GitCommand
@@ -44,7 +44,6 @@ public class GitRemoveCommand extends Ab
     protected ScmResult executeRemoveCommand( ScmProviderRepository repo, ScmFileSet fileSet,
String message )
         throws ScmException
     {
-        GitScmProviderRepository repository = (GitScmProviderRepository) repo;
 
         if ( fileSet.getFileList().isEmpty() )
         {
@@ -68,7 +67,7 @@ public class GitRemoveCommand extends Ab
         return new RemoveScmResult( cl.toString(), consumer.getRemovedFiles() );
     }
 
-    public static Commandline createCommandLine( File workingDirectory, List/*File*/ files
)
+    public static Commandline createCommandLine( File workingDirectory, List<File>
files )
     throws ScmException
     {
         Commandline cl = GitCommandLineUtils.getBaseGitCommandLine( workingDirectory, "rm"
);

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/remove/GitRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -31,6 +31,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class GitRemoveConsumer implements StreamConsumer
@@ -42,7 +43,7 @@ public class GitRemoveConsumer implement
 
     private ScmLogger logger;
 
-    private List removedFiles = new ArrayList();
+    private List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
     /**
      * @see #REMOVED_PATTERN
@@ -96,7 +97,7 @@ public class GitRemoveConsumer implement
         }
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }

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/remove/SvnRemoveCommand.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/remove/SvnRemoveCommand.java?rev=1056938&r1=1056937&r2=1056938&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/remove/SvnRemoveCommand.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/remove/SvnRemoveCommand.java
Sun Jan  9 14:27:54 2011
@@ -37,6 +37,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class SvnRemoveCommand
@@ -47,7 +48,7 @@ public class SvnRemoveCommand
     protected ScmResult executeRemoveCommand( ScmProviderRepository repository, ScmFileSet
fileSet, String message )
         throws ScmException
     {
-        if ( fileSet.getFiles().length == 0 )
+        if ( fileSet.getFileList().isEmpty() )
         {
             throw new ScmException( "You must provide at least one file/directory to remove"
);
         }
@@ -83,7 +84,7 @@ public class SvnRemoveCommand
         return new RemoveScmResult( cl.toString(), consumer.getRemovedFiles() );
     }
 
-    private static Commandline createCommandLine( File workingDirectory, List/*File*/ files
)
+    private static Commandline createCommandLine( File workingDirectory, List<File>
files )
         throws ScmException
     {
         // Base command line doesn't make sense here - username/password not needed, and
non-interactive/non-recusive is not valid

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/remove/SvnRemoveConsumer.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/remove/SvnRemoveConsumer.java?rev=1056938&r1=1056937&r2=1056938&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/remove/SvnRemoveConsumer.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/remove/SvnRemoveConsumer.java
Sun Jan  9 14:27:54 2011
@@ -29,6 +29,7 @@ import java.util.List;
 
 /**
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @author Olivier Lamy
  * @version $Id$
  */
 public class SvnRemoveConsumer
@@ -36,7 +37,7 @@ public class SvnRemoveConsumer
 {
     private ScmLogger logger;
 
-    private List removedFiles = new ArrayList();
+    private List<ScmFile> removedFiles = new ArrayList<ScmFile>();
 
     // ----------------------------------------------------------------------
     //
@@ -87,7 +88,7 @@ public class SvnRemoveConsumer
         removedFiles.add( new ScmFile( file, status ) );
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return removedFiles;
     }



Mime
View raw message