maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r495798 - in /maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe: ./ src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/ src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/command/list/
Date Sat, 13 Jan 2007 00:29:13 GMT
Author: kenney
Date: Fri Jan 12 16:29:12 2007
New Revision: 495798

URL: http://svn.apache.org/viewvc?view=rev&rev=495798
Log:
Implement list command

Added:
    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/list/
    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/list/CvsExeListCommand.java
  (with props)
Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/pom.xml
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/CvsExeScmProvider.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/pom.xml
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/pom.xml?view=diff&rev=495798&r1=495797&r2=495798
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/pom.xml
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/pom.xml
Fri Jan 12 16:29:12 2007
@@ -31,13 +31,13 @@
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-cvstest</artifactId>
-      <version>1.0-beta-4</version>
+      <version>1.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-cvs-commons</artifactId>
-      <version>1.0-beta-4</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

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/CvsExeScmProvider.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/CvsExeScmProvider.java?view=diff&rev=495798&r1=495797&r2=495798
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsexe/src/main/java/org/apache/maven/scm/provider/cvslib/cvsexe/CvsExeScmProvider.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/CvsExeScmProvider.java
Fri Jan 12 16:29:12 2007
@@ -27,6 +27,7 @@
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.checkin.CvsExeCheckInCommand;
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.checkout.CvsExeCheckOutCommand;
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.diff.CvsExeDiffCommand;
+import org.apache.maven.scm.provider.cvslib.cvsexe.command.list.CvsExeListCommand;
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.remove.CvsExeRemoveCommand;
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.status.CvsExeStatusCommand;
 import org.apache.maven.scm.provider.cvslib.cvsexe.command.tag.CvsExeTagCommand;
@@ -62,6 +63,11 @@
     protected Command getDiffCommand()
     {
         return new CvsExeDiffCommand();
+    }
+
+    protected Command getListCommand()
+    {
+        return new CvsExeListCommand();
     }
 
     protected Command getLoginCommand()

Added: 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/list/CvsExeListCommand.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/list/CvsExeListCommand.java?view=auto&rev=495798
==============================================================================
--- 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/list/CvsExeListCommand.java
(added)
+++ 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/list/CvsExeListCommand.java
Fri Jan 12 16:29:12 2007
@@ -0,0 +1,70 @@
+package org.apache.maven.scm.provider.cvslib.cvsexe.command.list;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.scm.CommandParameters;
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.command.list.ListScmResult;
+import org.apache.maven.scm.command.status.StatusScmResult;
+import org.apache.maven.scm.command.update.UpdateScmResult;
+import org.apache.maven.scm.provider.ScmProviderRepository;
+import org.apache.maven.scm.provider.cvslib.command.list.AbstractCvsListCommand;
+import org.apache.maven.scm.provider.cvslib.cvsexe.command.status.CvsExeStatusCommand;
+import org.apache.maven.scm.provider.cvslib.cvsexe.command.status.CvsStatusConsumer;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
+ * @version $Id$
+ */
+public class CvsExeListCommand
+    extends AbstractCvsListCommand
+{
+    protected ListScmResult executeCvsCommand( Commandline cl )
+        throws ScmException
+    {
+        CvsStatusConsumer consumer = new CvsStatusConsumer( getLogger(), cl.getWorkingDirectory()
);
+
+        CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
+
+        int exitCode;
+
+        try
+        {
+            exitCode = CommandLineUtils.executeCommandLine( cl, consumer, stderr );
+        }
+        catch ( CommandLineException ex )
+        {
+            throw new ScmException( "Error while executing command.", ex );
+        }
+
+        if ( exitCode != 0 )
+        {
+            return new ListScmResult( cl.toString(), "The cvs command failed.", stderr.getOutput(),
false );
+        }
+
+        return new ListScmResult( cl.toString(), consumer.getChangedFiles() );
+
+    }
+}

Propchange: 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/list/CvsExeListCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 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/list/CvsExeListCommand.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message