maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r525259 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/manager/ maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/ maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ maven-scm-providers/maven-s...
Date Tue, 03 Apr 2007 20:03:56 GMT
Author: evenisse
Date: Tue Apr  3 13:03:53 2007
New Revision: 525259

URL: http://svn.apache.org/viewvc?view=rev&rev=525259
Log:
o Add few new methods
o Clean the code by using scm commands from the manager

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
    maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AddMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/EditMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/StatusMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnEditMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.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
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/changelog/ChangeLogCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
Tue Apr  3 13:03:53 2007
@@ -540,6 +540,15 @@
     /**
      *
      */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern
)
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, datePattern );
+    }
+
+    /**
+     *
+     */
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion
version,
                                    String datePattern )
         throws ScmException
@@ -550,10 +559,29 @@
     /**
      *
      */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate
)
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, lastUpdate );
+    }
+
+    /**
+     *
+     */
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion
version, Date lastUpdate )
         throws ScmException
     {
         return this.getProviderByRepository( repository ).update( repository, fileSet, version,
lastUpdate );
+    }
+
+    /**
+     *
+     */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate,
String datePattern )
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, lastUpdate,
+                                                                  datePattern );
     }
 
     /**

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
Tue Apr  3 13:03:53 2007
@@ -467,6 +467,18 @@
      *
      * @param repository  the source control system
      * @param fileSet     location of your local copy
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern
)
+        throws ScmException;
+
+    /**
+     * Updates the copy on the local machine with the changes in the repository
+     *
+     * @param repository  the source control system
+     * @param fileSet     location of your local copy
      * @param version     use the version defined by the branch/tag/revision
      * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return
@@ -480,12 +492,37 @@
      *
      * @param repository the source control system
      * @param fileSet    location of your local copy
+     * @param lastUpdate
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate
)
+        throws ScmException;
+
+    /**
+     * Updates the copy on the local machine with the changes in the repository
+     *
+     * @param repository the source control system
+     * @param fileSet    location of your local copy
      * @param version    use the version defined by the branch/tag/revision
      * @param lastUpdate
      * @return
      * @throws ScmException
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
Date lastUpdate )
+        throws ScmException;
+
+    /**
+     * Updates the copy on the local machine with the changes in the repository
+     *
+     * @param repository  the source control system
+     * @param fileSet     location of your local copy
+     * @param lastUpdate  Date of last update
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate,
String datePattern )
         throws ScmException;
 
     /**

Modified: maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
(original)
+++ maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
Tue Apr  3 13:03:53 2007
@@ -234,8 +234,7 @@
             return;
         }
 
-        CheckOutScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .checkOut( scmRepository, new ScmFileSet( workingDirectory ), version );
+        CheckOutScmResult result = scmManager.checkOut( scmRepository, new ScmFileSet( workingDirectory
), version );
 
         if ( !result.isSuccess() )
         {
@@ -268,8 +267,7 @@
 
         String message = "";
 
-        CheckInScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .checkIn( scmRepository, new ScmFileSet( workingDirectory ), version, message
);
+        CheckInScmResult result = scmManager.checkIn( scmRepository, new ScmFileSet( workingDirectory
), version, message );
 
         if ( !result.isSuccess() )
         {
@@ -300,8 +298,7 @@
             return;
         }
 
-        UpdateScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .update( scmRepository, new ScmFileSet( workingDirectory ), version );
+        UpdateScmResult result = scmManager.update( scmRepository, new ScmFileSet( workingDirectory
), version );
 
         if ( !result.isSuccess() )
         {

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AddMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AddMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AddMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AddMojo.java
Tue Apr  3 13:03:53 2007
@@ -42,7 +42,7 @@
         {
             ScmRepository repository = getScmRepository();
 
-            AddScmResult result = getScmManager().getProviderByRepository( repository ).add(
repository, getFileSet() );
+            AddScmResult result = getScmManager().add( repository, getFileSet() );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java
Tue Apr  3 13:03:53 2007
@@ -74,12 +74,8 @@
         {
             ScmRepository repository = getScmRepository();
 
-            CheckInScmResult result = getScmManager().getProviderByRepository( repository
).checkIn( repository,
-                                                                                        
            getFileSet(),
-                                                                                        
            getScmVersion(
-                                                                                        
                scmVersionType,
-                                                                                        
                scmVersion ),
-                                                                                        
            message );
+            CheckInScmResult result = getScmManager().checkIn( repository, getFileSet(),
+                                                               getScmVersion( scmVersionType,
scmVersion ), message );
 
             checkResult( result );
         }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
Tue Apr  3 13:03:53 2007
@@ -112,12 +112,8 @@
                 throw new MojoExecutionException( "Cannot create " + getCheckoutDirectory()
);
             }
 
-            CheckOutScmResult result = getScmManager().getProviderByRepository( repository
).checkOut( repository,
-                                                                                        
              new ScmFileSet(
-                                                                                        
                  getCheckoutDirectory().getAbsoluteFile() ),
-                                                                                        
              getScmVersion(
-                                                                                        
                  scmVersionType,
-                                                                                        
                  scmVersion ) );
+            CheckOutScmResult result = getScmManager().checkOut( repository, new ScmFileSet(
+                getCheckoutDirectory().getAbsoluteFile() ), getScmVersion( scmVersionType,
scmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java
Tue Apr  3 13:03:53 2007
@@ -82,13 +82,9 @@
         {
             ScmRepository repository = getScmRepository();
 
-            DiffScmResult result = getScmManager().getProviderByRepository( repository ).diff(
repository, getFileSet(),
-                                                                                        
      getScmVersion(
-                                                                                        
          startScmVersionType,
-                                                                                        
          startScmVersion ),
-                                                                                        
      getScmVersion(
-                                                                                        
          endScmVersionType,
-                                                                                        
          endScmVersion ) );
+            DiffScmResult result = getScmManager().diff( repository, getFileSet(),
+                                                         getScmVersion( startScmVersionType,
startScmVersion ),
+                                                         getScmVersion( endScmVersionType,
endScmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/EditMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/EditMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/EditMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/EditMojo.java
Tue Apr  3 13:03:53 2007
@@ -44,8 +44,7 @@
         {
             ScmRepository repository = getScmRepository();
 
-            EditScmResult result =
-                getScmManager().getProviderByRepository( repository ).edit( repository, getFileSet()
);
+            EditScmResult result = getScmManager().edit( repository, getFileSet() );
 
             checkResult( result );
         }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
Tue Apr  3 13:03:53 2007
@@ -106,14 +106,9 @@
                 throw new MojoExecutionException( "Cannot remove " + getExportDirectory()
);
             }
 
-            ExportScmResult result = getScmManager().getProviderByRepository( repository
).export( repository,
-                                                                                        
          new ScmFileSet(
-                                                                                        
              new File(
-                                                                                        
                  getExportDirectory() ).getAbsoluteFile() ),
-                                                                                        
          getScmVersion(
-                                                                                        
              scmVersionType,
-                                                                                        
              scmVersion ),
-                                                                                        
          getExportDirectory() );
+            ExportScmResult result = getScmManager().export( repository, new ScmFileSet(
+                new File( getExportDirectory() ).getAbsoluteFile() ), getScmVersion( scmVersionType,
scmVersion ),
+                                                                      getExportDirectory()
);
 
             checkResult( result );
         }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java
Tue Apr  3 13:03:53 2007
@@ -69,9 +69,8 @@
         try
         {
             ScmRepository repository = getScmRepository();
-            ListScmResult result = getScmManager().getProviderByRepository( repository ).list(
repository, getFileSet(),
-                                                                                        
      recursive, getScmVersion(
-                scmVersionType, scmVersion ) );
+            ListScmResult result = getScmManager().list( repository, getFileSet(), recursive,
+                                                         getScmVersion( scmVersionType, scmVersion
) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/StatusMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/StatusMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/StatusMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/StatusMojo.java
Tue Apr  3 13:03:53 2007
@@ -48,8 +48,7 @@
         {
             ScmRepository repository = getScmRepository();
 
-            StatusScmResult result =
-                getScmManager().getProviderByRepository( repository ).status( repository,
getFileSet() );
+            StatusScmResult result = getScmManager().status( repository, getFileSet() );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnEditMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnEditMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnEditMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UnEditMojo.java
Tue Apr  3 13:03:53 2007
@@ -44,8 +44,7 @@
         {
             ScmRepository repository = getScmRepository();
 
-            UnEditScmResult result =
-                getScmManager().getProviderByRepository( repository ).unedit( repository,
getFileSet() );
+            UnEditScmResult result = getScmManager().unedit( repository, getFileSet() );
 
             checkResult( result );
         }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java
Tue Apr  3 13:03:53 2007
@@ -84,12 +84,9 @@
         {
             ScmRepository repository = getScmRepository();
 
-            UpdateScmResult result = getScmManager().getProviderByRepository( repository
).update( repository,
-                                                                                        
          getFileSet(),
-                                                                                        
          getScmVersion(
-                                                                                        
              scmVersionType,
-                                                                                        
              scmVersion ),
-                                                                                        
          runChangelog );
+            UpdateScmResult result = getScmManager().update( repository, getFileSet(),
+                                                             getScmVersion( scmVersionType,
scmVersion ),
+                                                             runChangelog );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java
Tue Apr  3 13:03:53 2007
@@ -72,11 +72,8 @@
         {
             ScmRepository repository = getScmRepository();
 
-            UpdateScmResult result = getScmManager().getProviderByRepository( repository
).update( repository,
-                                                                                        
          getFileSet(),
-                                                                                        
          getScmVersion(
-                                                                                        
              scmVersionType,
-                                                                                        
              scmVersion ) );
+            UpdateScmResult result =
+                getScmManager().update( repository, getFileSet(), getScmVersion( scmVersionType,
scmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -97,9 +97,8 @@
         ScmManager scmManager = getScmManager();
         Date lastUpdate = new Date( System.currentTimeMillis() );
         Thread.sleep( 1000 );
-        UpdateScmResult result = scmManager.getProviderByUrl( getScmUrl() ).update( repository,
-                                                                                    new ScmFileSet(
getUpdatingCopy() ),
-                                                                                    (ScmVersion)
null, lastUpdate );
+        UpdateScmResult result =
+            scmManager.update( repository, new ScmFileSet( getUpdatingCopy() ), lastUpdate
);
 
         assertNotNull( "The command returned a null result.", result );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java
Tue Apr  3 13:03:53 2007
@@ -21,7 +21,6 @@
 
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.provider.cvslib.AbstractCvsScmTest;
@@ -50,8 +49,7 @@
     {
         ScmManager scmManager = getScmManager();
 
-        CheckOutScmResult result = scmManager.getProviderByRepository( getScmRepository()
).checkOut(
-            getScmRepository(), getScmFileSet(), (ScmVersion) null );
+        CheckOutScmResult result = scmManager.checkOut( getScmRepository(), getScmFileSet()
);
 
         if ( !result.isSuccess() )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvstest/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java
Tue Apr  3 13:03:53 2007
@@ -22,7 +22,6 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.provider.cvslib.AbstractCvsScmTest;
@@ -91,10 +90,7 @@
         // A new check out should return 0 updated files.
         ScmRepository scmRepository = scmManager.makeScmRepository( scmUrl );
 
-        UpdateScmResult result = scmManager.getProviderByRepository( scmRepository ).update(
scmRepository,
-                                                                                        
    new ScmFileSet(
-                                                                                        
        assertionDirectory ),
-                                                                                        
    (ScmVersion) null );
+        UpdateScmResult result = scmManager.update( scmRepository, new ScmFileSet( assertionDirectory
) );
 
         assertNotNull( result );
 
@@ -144,9 +140,7 @@
         CvsScmTestUtils.executeCVS( workingDirectory, arguments );
 
         // Check the updated files
-        result = scmManager.getProviderByRepository( scmRepository ).update( scmRepository,
-                                                                             new ScmFileSet(
assertionDirectory ),
-                                                                             (ScmVersion)
null );
+        result = scmManager.update( scmRepository, new ScmFileSet( assertionDirectory ) );
 
         assertNotNull( result );
 

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?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- 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
Tue Apr  3 13:03:53 2007
@@ -59,7 +59,7 @@
 
     public void consumeLine( String line )
     {
-        logger.info( line );
+        logger.debug( line );
         if ( StringUtils.isEmpty( line.trim() ) )
         {
             return;

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
Tue Apr  3 13:03:53 2007
@@ -19,12 +19,10 @@
  * under the License.
  */
 
-import org.apache.maven.scm.provider.ScmProvider;
-import org.apache.maven.scm.provider.ScmProviderStub;
-import org.apache.maven.scm.repository.ScmRepository;
-import org.apache.maven.scm.repository.ScmRepositoryException;
-import org.apache.maven.scm.repository.ScmRepositoryStub;
-import org.apache.maven.scm.repository.UnknownRepositoryStructure;
+import org.apache.maven.scm.ScmBranch;
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.add.AddScmResult;
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
@@ -38,15 +36,17 @@
 import org.apache.maven.scm.command.tag.TagScmResult;
 import org.apache.maven.scm.command.unedit.UnEditScmResult;
 import org.apache.maven.scm.command.update.UpdateScmResult;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmBranch;
-import org.apache.maven.scm.ScmVersion;
+import org.apache.maven.scm.provider.ScmProvider;
+import org.apache.maven.scm.provider.ScmProviderStub;
+import org.apache.maven.scm.repository.ScmRepository;
+import org.apache.maven.scm.repository.ScmRepositoryException;
+import org.apache.maven.scm.repository.ScmRepositoryStub;
+import org.apache.maven.scm.repository.UnknownRepositoryStructure;
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Date;
+import java.util.List;
 
 /**
  * Stub implementation of ScmManager for unit testing purposes. It allows setting the expected
results that the different methods will return.
@@ -330,8 +330,7 @@
     public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory
)
         throws ScmException
     {
-        return this.getProviderByRepository( repository ).export( repository, fileSet, (ScmVersion)
null,
-                                                                  outputDirectory );
+        return this.export( repository, fileSet, outputDirectory );
     }
 
     /**
@@ -429,6 +428,15 @@
     /**
      *
      */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern
)
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, datePattern );
+    }
+
+    /**
+     *
+     */
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion
version,
                                    String datePattern )
         throws ScmException
@@ -439,10 +447,29 @@
     /**
      *
      */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate
)
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, lastUpdate );
+    }
+
+    /**
+     *
+     */
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion
version, Date lastUpdate )
         throws ScmException
     {
         return this.getProviderByRepository( repository ).update( repository, fileSet, version,
lastUpdate );
+    }
+
+    /**
+     *
+     */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate,
String datePattern )
+        throws ScmException
+    {
+        return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion)
null, lastUpdate,
+                                                                  datePattern );
     }
 
     /**

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/changelog/ChangeLogCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/changelog/ChangeLogCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/changelog/ChangeLogCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/changelog/ChangeLogCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -67,7 +67,7 @@
 
         //Make a change to the readme.txt and commit the change
         ScmTestCase.makeFile( getWorkingCopy(), "/readme.txt", "changed readme.txt" );
-        CheckInScmResult checkInResult = provider.checkIn( getScmRepository(), fileSet, (ScmVersion)
null, COMMIT_MSG );
+        CheckInScmResult checkInResult = provider.checkIn( getScmRepository(), fileSet, COMMIT_MSG
);
         assertTrue( "Unable to checkin changes to the repository", checkInResult.isSuccess()
);
 
         result = provider.changeLog( getScmRepository(), fileSet, (ScmVersion) null, null
);

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -23,7 +23,6 @@
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmTckTestCase;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.add.AddScmResult;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
@@ -66,13 +65,14 @@
 
         changeReadmeTxt( readmeTxt );
 
-        AddScmResult addResult = getScmManager().getProviderByUrl( getScmUrl() )
-            .add( getScmRepository(), new ScmFileSet( getWorkingCopy(), "src/main/java/Foo.java",
null ) );
+        AddScmResult addResult = getScmManager().add( getScmRepository(), new ScmFileSet(
getWorkingCopy(),
+                                                                                        
 "src/main/java/Foo.java",
+                                                                                        
 null ) );
 
         assertResultIsSuccess( addResult );
 
-        CheckInScmResult result = getScmManager().getProviderByUrl( getScmUrl() )
-            .checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy() ), (ScmVersion)
null, "Commit message" );
+        CheckInScmResult result =
+            getScmManager().checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy()
), "Commit message" );
 
         assertResultIsSuccess( result );
 
@@ -94,8 +94,8 @@
 
         assertPath( "/test-repo/check-in/readme.txt", file2.getPath() );
 
-        CheckOutScmResult checkoutResult = getScmManager().getProviderByUrl( getScmUrl()
)
-            .checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy() ), (ScmVersion)
null );
+        CheckOutScmResult checkoutResult =
+            getScmManager().checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy()
) );
 
         assertResultIsSuccess( checkoutResult );
 
@@ -142,12 +142,9 @@
 
         assertResultIsSuccess( addResult );
 
-        CheckInScmResult result = getScmManager().getProviderByUrl( getScmUrl() ).checkIn(
getScmRepository(),
-                                                                                        
  new ScmFileSet(
-                                                                                        
      getWorkingCopy(),
-                                                                                        
      "**/Foo.java", null ),
-                                                                                        
  (ScmVersion) null,
-                                                                                        
  "Commit message" );
+        CheckInScmResult result = getScmManager().checkIn( getScmRepository(),
+                                                           new ScmFileSet( getWorkingCopy(),
"**/Foo.java", null ),
+                                                           "Commit message" );
 
         assertResultIsSuccess( result );
 
@@ -163,8 +160,8 @@
 
         assertPath( "/test-repo/check-in/Foo.java", file1.getPath() );
 
-        CheckOutScmResult checkoutResult = getScmManager().getProviderByUrl( getScmUrl()
)
-            .checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy() ), (ScmVersion)
null );
+        CheckOutScmResult checkoutResult =
+            getScmManager().checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy()
) );
 
         assertResultIsSuccess( checkoutResult );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -24,7 +24,6 @@
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmTckTestCase;
 import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.command.status.StatusScmResult;
 import org.apache.maven.scm.manager.ScmManager;
@@ -60,8 +59,7 @@
     private void commit( File workingDirectory, ScmRepository repository )
         throws Exception
     {
-        CheckInScmResult result = getScmManager().getProviderByUrl( getScmUrl() )
-            .checkIn( repository, new ScmFileSet( workingDirectory ), (ScmVersion) null,
"No msg" );
+        CheckInScmResult result = getScmManager().checkIn( repository, new ScmFileSet( workingDirectory
), "No msg" );
 
         assertTrue( "Check result was successful, output: " + result.getCommandOutput(),
result.isSuccess() );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -22,7 +22,6 @@
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmTag;
 import org.apache.maven.scm.ScmTckTestCase;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.command.tag.TagScmResult;
@@ -59,13 +58,13 @@
 
         changeReadmeTxt( readmeTxt );
 
-        CheckInScmResult checkinResult = getScmManager().getProviderByUrl( getScmUrl() )
-            .checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy() ), (ScmVersion)
null, "commit message" );
+        CheckInScmResult checkinResult =
+            getScmManager().checkIn( getScmRepository(), new ScmFileSet( getWorkingCopy()
), "commit message" );
 
         assertResultIsSuccess( checkinResult );
 
-        CheckOutScmResult checkoutResult = getScmManager().getProviderByUrl( getScmUrl()
)
-            .checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy() ), (ScmVersion)
null );
+        CheckOutScmResult checkoutResult =
+            getScmManager().checkOut( getScmRepository(), new ScmFileSet( getAssertionCopy()
) );
 
         assertResultIsSuccess( checkoutResult );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java?view=diff&rev=525259&r1=525258&r2=525259
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
Tue Apr  3 13:03:53 2007
@@ -63,8 +63,7 @@
     private void commit( File workingDirectory, ScmRepository repository )
         throws Exception
     {
-        CheckInScmResult result = getScmManager().getProviderByUrl( getScmUrl() )
-            .checkIn( repository, new ScmFileSet( workingDirectory ), (ScmVersion) null,
"No msg" );
+        CheckInScmResult result = getScmManager().checkIn( repository, new ScmFileSet( workingDirectory
), "No msg" );
 
         assertTrue( "Check result was successful, output: " + result.getCommandOutput(),
result.isSuccess() );
 
@@ -128,8 +127,7 @@
         // Update the project
         // ----------------------------------------------------------------------
 
-        UpdateScmResult result = scmManager.getProviderByUrl( getScmUrl() )
-            .update( repository, new ScmFileSet( getUpdatingCopy() ), (ScmVersion) null,
lastUpdate );
+        UpdateScmResult result = scmManager.update( repository, new ScmFileSet( getUpdatingCopy()
), lastUpdate );
 
         assertNotNull( "The command returned a null result.", result );
 



Mime
View raw message