maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r495767 - in /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm: command/list/ListScmResult.java provider/AbstractScmProvider.java provider/ScmProvider.java
Date Fri, 12 Jan 2007 22:39:22 GMT
Author: kenney
Date: Fri Jan 12 14:39:21 2007
New Revision: 495767

URL: http://svn.apache.org/viewvc?view=rev&rev=495767
Log:
Add new checkout method (add param recursive) in the api and default impl's for backwards
compatibility

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java?view=diff&rev=495767&r1=495766&r2=495767
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
Fri Jan 12 14:39:21 2007
@@ -34,6 +34,7 @@
 public class ListScmResult
     extends ScmResult
 {
+    // XXX List of what?
     private List files;
 
     public ListScmResult( String commandLine, String providerMessage, String commandOutput,
boolean success )
@@ -43,6 +44,7 @@
         files = new ArrayList( 0 );
     }
 
+    // XXX List of what?
     public ListScmResult( String commandLine, List files )
     {
         super( commandLine, null, null, true );
@@ -50,6 +52,7 @@
         this.files = files;
     }
 
+    // XXX List of what?
     public ListScmResult( List files, ScmResult result )
     {
         super( result );
@@ -57,6 +60,7 @@
         this.files = files;
     }
 
+    // XXX List of what?
     public List getFiles()
     {
         return files;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java?view=diff&rev=495767&r1=495766&r2=495767
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
Fri Jan 12 14:39:21 2007
@@ -244,11 +244,19 @@
     public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String
tag )
         throws ScmException
     {
+        return checkOut( repository, fileSet, tag, true );
+    }
+
+    public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String
tag, boolean recursive )
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
 
         parameters.setString( CommandParameter.TAG, tag );
+
+        parameters.setString( CommandParameter.RECURSIVE, recursive + "" );
 
         return checkout( repository, fileSet, parameters );
     }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java?view=diff&rev=495767&r1=495766&r2=495767
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
Fri Jan 12 14:39:21 2007
@@ -183,6 +183,10 @@
     /**
      * Save the changes you have done into the repository. This will create a new version
of the file or
      * directory in the repository.
+     * <p>
+     * When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
+     * When the fileSet has entries, the commit is non-recursive and only the elements in
the fileSet
+     * are committed.
      *
      * @param repository the source control system
      * @param fileSet    the files to check in (sometimes called commit)
@@ -204,6 +208,19 @@
      * @throws ScmException
      */
     CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag
)
+        throws ScmException;
+
+    /**
+     * Create a copy of the repository on your local machine.
+     *
+     * @param repository the source control system
+     * @param File       location to check out to
+     * @param tag        tag or revision
+     * @param recursive  whether to check out recursively
+     * @return
+     * @throws ScmException
+     */
+    CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, String
tag, boolean recursive )
         throws ScmException;
 
     DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, String startRevision,
String endRevision )



Mime
View raw message