maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r189654 - /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update /maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update /maven/scm/trunk/maven-scm-providers/maven-scm-provider-local /maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update /maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog /maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update /maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update
Date Wed, 08 Jun 2005 22:03:02 GMT
Author: evenisse
Date: Wed Jun  8 15:03:01 2005
New Revision: 189654

URL: http://svn.apache.org/viewcvs?rev=189654&view=rev
Log:
[SCM-43] Access to the changeSet list from update command.

Added:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommand.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/ChangeSet.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java Wed Jun
 8 15:03:01 2005
@@ -200,4 +200,23 @@
     {
         return author + "\n" + date + "\n" + file + "\n" + comment;
     }
+
+    /**
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof ChangeSet )
+        {
+            ChangeSet changeSet = (ChangeSet) obj;
+
+            if ( date.equals( changeSet.getDate() ) && author.equals( changeSet.getAuthor()
)
+                 && comment.equals( changeSet.getComment() ) && file.equals(
changeSet.getFile() ) )
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
 }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.command.changelog;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,10 +32,11 @@
  */
 public abstract class AbstractChangeLogCommand
     extends AbstractCommand
+    implements ChangeLogCommand
 {
-    protected abstract ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository
repository, ScmFileSet fileSet,
-                                                                   Date startDate, Date endDate,
int numDays,
-                                                                   String branch )
+    protected abstract ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository
repository,
+                                                                   ScmFileSet fileSet, Date
startDate, Date endDate,
+                                                                   int numDays, String branch
)
         throws ScmException;
 
     public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )

Added: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java?rev=189654&view=auto
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
(added)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
Wed Jun  8 15:03:01 2005
@@ -0,0 +1,33 @@
+package org.apache.maven.scm.command.changelog;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.provider.ScmProviderRepository;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id: SvnScmProvider.java 162313 2005-04-06 14:05:04Z trygvis $
+ */
+public interface ChangeLogCommand
+{
+    ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters
parameters )
+        throws ScmException;
+}

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.command.changelog;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
Wed Jun  8 15:03:01 2005
@@ -16,14 +16,22 @@
  * limitations under the License.
  */
 
+import org.apache.maven.scm.ChangeSet;
 import org.apache.maven.scm.CommandParameter;
 import org.apache.maven.scm.CommandParameters;
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
 import org.apache.maven.scm.command.AbstractCommand;
+import org.apache.maven.scm.command.changelog.ChangeLogCommand;
+import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse </a>
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -36,12 +44,50 @@
                                                              String tag )
         throws ScmException;
 
-    public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                     CommandParameters parameters )
+    public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
         throws ScmException
     {
         String tag = parameters.getString( CommandParameter.TAG, null );
 
-        return executeUpdateCommand( repository, fileSet, tag );
+        UpdateScmResult updateScmResult = executeUpdateCommand( repository, fileSet, tag
);
+
+        List filesList = updateScmResult.getUpdatedFiles();
+
+        ChangeLogCommand changeLogCmd = getChangeLogCommand();
+
+        if ( filesList != null && filesList.size() > 0 && changeLogCmd
!= null )
+        {
+            ChangeLogScmResult changeLogScmResult = (ChangeLogScmResult) changeLogCmd.executeCommand(
repository,
+                                                                                        
             fileSet,
+                                                                                        
             parameters );
+
+            List changes = new ArrayList();
+
+            List changesList = changeLogScmResult.getChangeLog();
+
+            if ( changesList != null )
+            {
+                for ( Iterator i = changesList.iterator(); i.hasNext(); )
+                {
+                    ChangeSet change = (ChangeSet) i.next();
+
+                    for ( Iterator j = filesList.iterator(); j.hasNext(); )
+                    {
+                        ScmFile currentFile = (ScmFile) j.next();
+
+                        if ( currentFile.getPath().equals( change.getFile().getName() ) )
+                        {
+                            changes.add( change );
+                        }
+                    }
+                }
+            }
+
+            updateScmResult.setChanges( changes );
+        }
+
+        return updateScmResult;
     }
+
+    protected abstract ChangeLogCommand getChangeLogCommand();
 }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.command.update;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,6 +29,8 @@
 {
     private List updatedFiles;
 
+    private List changes;
+
     public UpdateScmResult( String providerMessage, String commandOutput, boolean success
)
     {
         super( providerMessage, commandOutput, success );
@@ -44,5 +46,15 @@
     public List getUpdatedFiles()
     {
         return updatedFiles;
+    }
+
+    public List getChanges()
+    {
+        return changes;
+    }
+
+    public void setChanges( List changes )
+    {
+        this.changes = changes;
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.provider.cvslib.command.update;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,10 +18,12 @@
 
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.cvslib.command.CvsCommand;
+import org.apache.maven.scm.provider.cvslib.command.changelog.CvsChangeLogCommand;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
@@ -31,7 +33,9 @@
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
-public class CvsUpdateCommand extends AbstractUpdateCommand implements CvsCommand
+public class CvsUpdateCommand
+    extends AbstractUpdateCommand
+    implements CvsCommand
 {
     public UpdateScmResult executeUpdateCommand( ScmProviderRepository repo, ScmFileSet fileSet,
String tag )
         throws ScmException
@@ -79,5 +83,17 @@
         }
 
         return new UpdateScmResult( consumer.getUpdatedFiles() );
+    }
+
+    /**
+     * @see org.apache.maven.scm.command.update.AbstractUpdateCommand#getChangeLogCommand()
+     */
+    protected ChangeLogCommand getChangeLogCommand()
+    {
+        CvsChangeLogCommand command = new CvsChangeLogCommand();
+
+        command.enableLogging( this.getLogger() );
+
+        return command;
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/pom.xml Wed Jun  8 15:03:01
2005
@@ -3,7 +3,7 @@
   <parent>
     <groupId>org.apache.maven.scm</groupId>
     <artifactId>maven-scm-providers</artifactId>
-    <version>1.0-alpha-1</version>
+    <version>1.0-alpha-2-SNAPSHOT</version>
   </parent>
   <artifactId>maven-scm-provider-local</artifactId>
   <name>Maven SCM Local Provider</name>

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.provider.local.command.update;
 
 /*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -75,22 +76,25 @@
             throw new ScmException( "The module directory doesn't exist (" + source.getAbsolutePath()
+ ")." );
         }
 
-    	if ( !baseDestination.exists() && !baseDestination.isDirectory() )
-    	{
-    	    throw new ScmException( "The destination directory isn't a directory or doesn't
exist (" + baseDestination.getAbsolutePath() + ")." );
-    	}
+        if ( !baseDestination.exists() && !baseDestination.isDirectory() )
+        {
+            throw new ScmException( "The destination directory isn't a directory or doesn't
exist ("
+                                    + baseDestination.getAbsolutePath() + ")." );
+        }
 
-    	List updatedFiles;
+        List updatedFiles;
 
-    	try
+        try
         {
-        	getLogger().info( "Updating '" + baseDestination.getAbsolutePath() + "' from '"
+ source.getAbsolutePath() + "'." );
+            getLogger().info(
+                              "Updating '" + baseDestination.getAbsolutePath() + "' from
'" + source.getAbsolutePath()
+                                  + "'." );
 
-        	List fileList = FileUtils.getFiles( source.getAbsoluteFile(), "**", null );
+            List fileList = FileUtils.getFiles( source.getAbsoluteFile(), "**", null );
 
-        	updatedFiles = update( source, baseDestination, fileList );
+            updatedFiles = update( source, baseDestination, fileList );
         }
-        catch( IOException ex )
+        catch ( IOException ex )
         {
             throw new ScmException( "Error while checking out the files.", ex );
         }
@@ -99,7 +103,7 @@
     }
 
     private List update( File source, File baseDestination, List files )
-    	throws ScmException, IOException
+        throws ScmException, IOException
     {
         String sourcePath = source.getAbsolutePath();
 
@@ -137,7 +141,8 @@
 
             if ( !destinationDirectory.exists() && !destinationDirectory.mkdirs()
)
             {
-                throw new ScmException( "Could not create destination directory '" + destinationDirectory.getAbsolutePath()
+ "'." );
+                throw new ScmException( "Could not create destination directory '"
+                                        + destinationDirectory.getAbsolutePath() + "'." );
             }
 
             ScmFileStatus status;
@@ -161,5 +166,14 @@
         }
 
         return updatedFiles;
+    }
+
+    /**
+     * @see org.apache.maven.scm.command.update.AbstractUpdateCommand#getChangeLogCommand()
+     */
+    protected ChangeLogCommand getChangeLogCommand()
+    {
+        // TODO Change this when changelog command will be implemented
+        return null;
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommand.java
Wed Jun  8 15:03:01 2005
@@ -24,6 +24,8 @@
 import org.apache.maven.scm.provider.svn.command.SvnCommand;
 import org.apache.maven.scm.provider.svn.command.SvnCommandLineUtils;
 import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
 import java.io.File;
@@ -50,7 +52,26 @@
 
         SvnChangeLogConsumer consumer = new SvnChangeLogConsumer();
 
-        // TODO: implement
+        CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
+
+        getLogger().info( "Executing: " + cl );
+        getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath()
);
+
+        int exitCode;
+
+        try
+        {
+            exitCode = CommandLineUtils.executeCommandLine( cl, consumer, stderr );
+        }
+        catch ( CommandLineException ex )
+        {
+            throw new ScmException( "Error while executing svn command.", ex );
+        }
+
+        if ( exitCode != 0 )
+        {
+            return new ChangeLogScmResult( "The svn command failed.", stderr.getOutput(),
false );
+        }
 
         return new ChangeLogScmResult( consumer.getModifications() );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommand.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommand.java
Wed Jun  8 15:03:01 2005
@@ -1,7 +1,7 @@
 package org.apache.maven.scm.provider.svn.command.update;
 
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
+ * Copyright 2003-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,11 +18,13 @@
 
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.svn.command.SvnCommand;
 import org.apache.maven.scm.provider.svn.command.SvnCommandLineUtils;
+import org.apache.maven.scm.provider.svn.command.changelog.SvnChangeLogCommand;
 import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
@@ -73,8 +75,7 @@
     //
     // ----------------------------------------------------------------------
 
-    public static Commandline createCommandLine( SvnScmProviderRepository repository, File
workingDirectory,
-                                                 String tag )
+    public static Commandline createCommandLine( SvnScmProviderRepository repository, File
workingDirectory, String tag )
     {
         Commandline cl = SvnCommandLineUtils.getBaseSvnCommandLine( workingDirectory, repository
);
 
@@ -88,5 +89,17 @@
         }
 
         return cl;
+    }
+
+    /**
+     * @see org.apache.maven.scm.command.update.AbstractUpdateCommand#getChangeLogCommand()
+     */
+    protected ChangeLogCommand getChangeLogCommand()
+    {
+        SvnChangeLogCommand command =  new SvnChangeLogCommand();
+
+        command.enableLogging( this.getLogger() );
+
+        return command;
     }
 }

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java?rev=189654&r1=189653&r2=189654&view=diff
==============================================================================
--- 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
Wed Jun  8 15:03:01 2005
@@ -212,8 +212,11 @@
         assertNull( "The command output wasn't null", result.getCommandOutput() );
 
         List updatedFiles = result.getUpdatedFiles();
+        List changedFiles = result.getChanges();
 
         assertEquals( "Expected 3 files in the updated files list " + updatedFiles, 3, updatedFiles.size()
);
+
+        assertNotNull( "The changed files list is null", changedFiles );
 
         // ----------------------------------------------------------------------
         // Assert the files in the updated files list



Mime
View raw message