maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r374369 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/ maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ maven-scm-api/src/main/java/org/apache/maven/scm/provider/ maven-scm-api/src/main/java/org/...
Date Thu, 02 Feb 2006 12:00:38 GMT
Author: evenisse
Date: Thu Feb  2 03:59:40 2006
New Revision: 374369

URL: http://svn.apache.org/viewcvs?rev=374369&view=rev
Log:
Allow to define date format in changelog output parsed by changelog consumer.

Added:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java   (with props)
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/CommandParameter.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/provider/AbstractScmProvider.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
    maven/scm/trunk/maven-scm-client/pom.xml
    maven/scm/trunk/maven-scm-plugin/pom.xml
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/BazaarConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/add/BazaarAddConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.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/changelog/SvnChangeLogConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumerTest.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=374369&r1=374368&r2=374369&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 Thu Feb  2 03:59:40 2006
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.scm.provider.ScmProviderRepository;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -94,9 +95,9 @@
 
     private List files;
 
-    public ChangeSet( String date, String comment, String author, List files )
+    public ChangeSet( String date, String userDatePattern, String comment, String author, List files )
     {
-        setDate( date );
+        setDate( date, userDatePattern );
 
         setAuthor( author );
 
@@ -227,19 +228,59 @@
      */
     public void setDate( String date )
     {
+        setDate( date, null );
+    }
+
+    /**
+     * Setter for property date that takes a string and parses it
+     *
+     * @param date            - a string in yyyy/MM/dd HH:mm:ss format
+     * @param userDatePattern - pattern of date
+     */
+    public void setDate( String date, String userDatePattern )
+    {
         try
         {
-            this.date = TIMESTAMP_FORMAT_1.parse( date );
+            if ( !StringUtils.isEmpty( userDatePattern ) )
+            {
+                SimpleDateFormat format = new SimpleDateFormat( userDatePattern );
+                this.date = format.parse( date );
+            }
+            else
+            {
+                this.date = TIMESTAMP_FORMAT_1.parse( date );
+            }
         }
         catch ( ParseException e )
         {
-            try
+            if ( !StringUtils.isEmpty( userDatePattern ) )
             {
-                this.date = TIMESTAMP_FORMAT_2.parse( date );
+                try
+                {
+                    this.date = TIMESTAMP_FORMAT_2.parse( date );
+                }
+                catch ( ParseException pe )
+                {
+                    try
+                    {
+                        this.date = TIMESTAMP_FORMAT_2.parse( date );
+                    }
+                    catch ( ParseException ex )
+                    {
+                        throw new IllegalArgumentException( "Unable to parse date: " + date );
+                    }
+                }
             }
-            catch ( ParseException ex )
+            else
             {
-                throw new IllegalArgumentException( "Unable to parse CVS date: " + date );
+                try
+                {
+                    this.date = TIMESTAMP_FORMAT_2.parse( date );
+                }
+                catch ( ParseException ex )
+                {
+                    throw new IllegalArgumentException( "Unable to parse date: " + date );
+                }
             }
         }
     }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java Thu Feb  2 03:59:40 2006
@@ -42,6 +42,8 @@
 
     public final static CommandParameter END_TAG = new CommandParameter( "endTag" );
 
+    public final static CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter( "changelogDatePattern" );
+
     public final static CommandParameter TAG = new CommandParameter( "tag" );
 
     public final static CommandParameter FILE = new CommandParameter( "file" );

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=374369&r1=374368&r2=374369&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 Thu Feb  2 03:59:40 2006
@@ -36,11 +36,12 @@
     implements ChangeLogCommand
 {
     protected abstract ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                                   Date startDate, Date endDate, String branch )
+                                                                   Date startDate, Date endDate, String branch,
+                                                                   String datePattern )
         throws ScmException;
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                          String startTag, String endTag )
+                                                          String startTag, String endTag, String datePattern )
         throws ScmException
     {
         throw new ScmException( "Unsupported method for this provider." );
@@ -62,9 +63,11 @@
 
         String endTag = parameters.getString( CommandParameter.END_TAG, null );
 
+        String datePattern = parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null );
+
         if ( !StringUtils.isEmpty( startTag ) )
         {
-            return executeChangeLogCommand( repository, fileSet, startTag, endTag );
+            return executeChangeLogCommand( repository, fileSet, startTag, endTag, datePattern );
         }
         else
         {
@@ -85,7 +88,7 @@
                 endDate = new Date( System.currentTimeMillis() + (long) 1 * 24 * 60 * 60 * 1000 );
             }
 
-            return executeChangeLogCommand( repository, fileSet, startDate, endDate, branch );
+            return executeChangeLogCommand( repository, fileSet, startDate, endDate, branch, datePattern );
         }
     }
 }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- 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 Thu Feb  2 03:59:40 2006
@@ -116,6 +116,15 @@
                                          int numDays, String branch )
         throws ScmException
     {
+        return changeLog( repository, fileSet, startDate, endDate, numDays, branch, null);
+    }
+    /**
+     * @see org.apache.maven.scm.provider.ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet, java.util.Date, java.util.Date, int, java.lang.String, java.lang.String)
+     */
+    public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
+                                         int numDays, String branch, String datePattern )
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
@@ -128,6 +137,8 @@
 
         parameters.setString( CommandParameter.BRANCH, branch );
 
+        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+
         return changelog( repository, fileSet, parameters );
     }
 
@@ -137,6 +148,14 @@
     public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag )
         throws ScmException
     {
+        return changeLog( repository, fileSet, startTag, endTag, null);
+    }
+    /**
+     * @see org.apache.maven.scm.provider.ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet, java.lang.String, java.lang.String, java.lang.String)
+     */
+    public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern )
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
@@ -145,6 +164,8 @@
 
         parameters.setString( CommandParameter.END_TAG, endTag );
 
+        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+
         return changelog( repository, fileSet, parameters );
     }
 
@@ -235,9 +256,7 @@
     protected LoginScmResult login( ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters )
         throws ScmException
     {
-        LoginScmResult result = new LoginScmResult( null, null, null, true );
-
-        return result;
+        return new LoginScmResult( null, null, null, true );
     }
 
     /**
@@ -307,12 +326,22 @@
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag )
         throws ScmException
     {
+        return update( repository, fileSet, tag, "");
+    }
+    /**
+     * @see org.apache.maven.scm.provider.ScmProvider#update(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet, java.lang.String, java.lang.String)
+     */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern )
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
 
         parameters.setString( CommandParameter.TAG, tag );
 
+        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+
         return update( repository, fileSet, parameters );
     }
 
@@ -322,6 +351,15 @@
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate )
         throws ScmException
     {
+        return update( repository, fileSet, tag, lastUpdate, null);
+    }
+
+    /**
+     * @see org.apache.maven.scm.provider.ScmProvider#update(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet, java.lang.String, java.util.Date, java.lang.String)
+     */
+    public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern )
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
@@ -333,6 +371,8 @@
             parameters.setDate( CommandParameter.START_DATE, lastUpdate );
         }
 
+        parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+
         return update( repository, fileSet, parameters );
     }
 
@@ -396,7 +436,7 @@
     }
 
     /**
-     * @see org.apache.maven.scm.provider.ScmProvider#makeProviderScmRepository(java.io.File, java.lang.String)
+     * @see org.apache.maven.scm.provider.ScmProvider#makeProviderScmRepository(java.io.File)
      */
     public ScmProviderRepository makeProviderScmRepository( File path )
         throws ScmRepositoryException, UnknownRepositoryStructure

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- 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 Thu Feb  2 03:59:40 2006
@@ -90,6 +90,25 @@
         throws ScmException;
 
     /**
+     * Returns the changes that have happend in the source control system in a certain period of time.
+     * This can be adding, removing, updating, ... of files
+     *
+     * @param repository  the source control system
+     * @param fileSet     the files to know the changes about. Implementations can also give the changes
+     *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startDate   the start date of the period
+     * @param endDate     the end date of the period
+     * @param numDays
+     * @param branch
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
+                                  int numDays, String branch, String datePattern )
+        throws ScmException;
+
+    /**
      * Returns the changes that have happend in the source control system between two tags.
      * This can be adding, removing, updating, ... of files
      *
@@ -105,6 +124,23 @@
         throws ScmException;
 
     /**
+     * Returns the changes that have happend in the source control system between two tags.
+     * This can be adding, removing, updating, ... of files
+     *
+     * @param repository  the source control system
+     * @param fileSet     the files to know the changes about. Implementations can also give the changes
+     *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startTag    the start tag
+     * @param endTag      the end tag
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag,
+                                  String datePattern )
+        throws ScmException;
+
+    /**
      * Save the changes you have done into the repository. This will create a new version of the file or
      * directory in the repository.
      *
@@ -186,6 +222,19 @@
     /**
      * 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 tag         use the version defined by the tag
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, 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 tag        use the version defined by the tag
@@ -194,6 +243,21 @@
      * @throws ScmException
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, 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 tag         use the version defined by the tag
+     * @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, String tag, Date lastUpdate,
+                            String datePattern )
         throws ScmException;
 
     /**

Added: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java?rev=374369&view=auto
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java (added)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java Thu Feb  2 03:59:40 2006
@@ -0,0 +1,91 @@
+package org.apache.maven.scm.util;
+
+/*
+ * Copyright 2001-2006 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.log.ScmLogger;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public abstract class AbstractConsumer
+    implements StreamConsumer
+{
+    private ScmLogger logger;
+
+    public AbstractConsumer( ScmLogger logger )
+    {
+        setLogger( logger );
+    }
+
+    public ScmLogger getLogger()
+    {
+        return logger;
+    }
+
+    public void setLogger( ScmLogger logger )
+    {
+        this.logger = logger;
+    }
+
+    /**
+     * Converts the date timestamp from the output into a date object.
+     *
+     * @return A date representing the timestamp of the log entry.
+     */
+    protected Date parseDate( String date, String userPattern, String defaultPattern )
+    {
+        SimpleDateFormat format;
+
+        if ( !StringUtils.isEmpty( userPattern ) )
+        {
+            format = new SimpleDateFormat( userPattern );
+        }
+        else
+        {
+            if ( !StringUtils.isEmpty( defaultPattern ) )
+            {
+                format = new SimpleDateFormat( defaultPattern );
+            }
+            else
+            {
+                format = new SimpleDateFormat();
+            }
+        }
+
+        try
+        {
+            return format.parse( date );
+        }
+        catch ( ParseException e )
+        {
+            if ( getLogger() != null )
+            {
+                getLogger().error( "ParseException Caught", e );
+            }
+
+            return null;
+        }
+    }
+}

Propchange: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/scm/trunk/maven-scm-client/pom.xml
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-client/pom.xml?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-client/pom.xml (original)
+++ maven/scm/trunk/maven-scm-client/pom.xml Thu Feb  2 03:59:40 2006
@@ -11,6 +11,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-bazaar</artifactId>
+      <version>1.0-beta-3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-perforce</artifactId>
       <version>1.0-beta-3-SNAPSHOT</version>
     </dependency>

Modified: maven/scm/trunk/maven-scm-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-plugin/pom.xml?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/pom.xml (original)
+++ maven/scm/trunk/maven-scm-plugin/pom.xml Thu Feb  2 03:59:40 2006
@@ -40,6 +40,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-bazaar</artifactId>
+      <version>1.0-beta-3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-perforce</artifactId>
       <version>1.0-beta-3-SNAPSHOT</version>
     </dependency>

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java Thu Feb  2 03:59:40 2006
@@ -56,6 +56,13 @@
      */
     private String endDate;
 
+    /**
+     * Date Format in changelog output of scm tool
+     *
+     * @parameter expression="${dateFormat}"
+     */
+    private String dateFormat;
+
     private SimpleDateFormat localFormat = new SimpleDateFormat();
 
     public void execute()
@@ -69,7 +76,7 @@
             ScmProvider provider = getScmManager().getProviderByRepository( repository );
 
             ChangeLogScmResult result = provider.changeLog( repository, getFileSet(), this.parseDate( this.startDate ),
-                                                            this.parseDate( this.endDate ), 0, null );
+                                                            this.parseDate( this.endDate ), 0, null, dateFormat );
             checkResult( result );
 
             ChangeLogSet changeLogSet = result.getChangeLog();
@@ -77,6 +84,7 @@
             for ( Iterator i = changeLogSet.getChangeSets().iterator(); i.hasNext(); )
             {
                 ChangeSet changeSet = (ChangeSet) i.next();
+
                 System.out.println( changeSet.toString() );
             }
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/BazaarConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/BazaarConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/BazaarConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/BazaarConsumer.java Thu Feb  2 03:59:40 2006
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.util.AbstractConsumer;
 import org.apache.maven.scm.log.ScmLogger;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 
@@ -33,7 +34,7 @@
  * @author <a href="mailto:torbjorn@smorgrav.org">Torbjørn Eikli Smørgrav</a>
  */
 public class BazaarConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
 
     /**
@@ -57,14 +58,9 @@
         messages.put( "bzr: ERROR:", "ERROR" );
     }
 
-    /**
-     * Shared logger with all consumer implementations
-     */
-    protected final ScmLogger logger;
-
     public BazaarConsumer( ScmLogger logger )
     {
-        this.logger = logger;
+        super( logger);
     }
 
     public void doConsume( ScmFileStatus status, String trimmedLine )
@@ -74,7 +70,7 @@
 
     public void consumeLine( String line )
     {
-        logger.debug( line );
+        getLogger().debug( line );
         String trimmedLine = line.trim();
 
         String statusStr = processInputForKnownIdentifiers( trimmedLine );
@@ -123,11 +119,11 @@
                 String message = line.substring( prefix.length() );
                 if ( messages.get( prefix ).equals( "WARNING" ) )
                 {
-                    logger.warn( message );
+                    getLogger().warn( message );
                 }
                 else
                 {
-                    logger.error( message );
+                    getLogger().error( message );
                 }
                 return true;
             }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/add/BazaarAddConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/add/BazaarAddConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/add/BazaarAddConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/add/BazaarAddConsumer.java Thu Feb  2 03:59:40 2006
@@ -49,12 +49,12 @@
             File tmpFile = new File( workingDir, trimmedLine );
             if ( !tmpFile.exists() )
             {
-                logger.warn( "Not a file: " + tmpFile + ". Ignored" );
+                getLogger().warn( "Not a file: " + tmpFile + ". Ignored" );
             }
             else
             {
                 ScmFile scmFile = new ScmFile( trimmedLine, ScmFileStatus.ADDED );
-                logger.info( scmFile.toString() );
+                getLogger().info( scmFile.toString() );
                 addedFiles.add( scmFile );
             }
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -40,11 +40,13 @@
     implements BazaarCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
         String[] cmd = new String[]{LOG_CMD, VERBOSE_OPTION};
-        BazaarChangeLogConsumer consumer = new BazaarChangeLogConsumer( getLogger(), fileSet.getBasedir() );
+        BazaarChangeLogConsumer consumer =
+            new BazaarChangeLogConsumer( getLogger(), datePattern, fileSet.getBasedir() );
         ScmResult result = BazaarUtils.execute( consumer, getLogger(), fileSet.getBasedir(), cmd );
 
         List logEntries = consumer.getModifications();

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -23,8 +23,6 @@
 import org.apache.maven.scm.provider.bazaar.command.BazaarConsumer;
 
 import java.io.File;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -36,7 +34,7 @@
     extends BazaarConsumer
 {
 
-    private static final SimpleDateFormat BAZAAR_TIME_FORMAT = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss Z" );
+    private static final String BAZAAR_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss Z";
 
     private static final String START_LOG_TAG = "-----";
 
@@ -60,15 +58,19 @@
 
     private StringBuffer currentComment;
 
+    private String userDatePattern;
+
     /**
      * null means not parsing message nor files, UNKNOWN means parsing message
      */
     private ScmFileStatus currentStatus = null;
 
-    public BazaarChangeLogConsumer( ScmLogger logger, File workingDir )
+    public BazaarChangeLogConsumer( ScmLogger logger, String userDatePattern, File workingDir )
     {
         super( logger );
 
+        this.userDatePattern = userDatePattern;
+
         this.workingDir = workingDir;
     }
 
@@ -79,7 +81,7 @@
 
     public void doConsume( ScmFileStatus status, String line )
     {
-        String tmpLine = new String( line );
+        String tmpLine = line;
 
         // Parse line
         if ( line.startsWith( START_LOG_TAG ) )
@@ -106,15 +108,8 @@
         {
             tmpLine = line.substring( TIME_STAMP_TOKEN.length() + 3 );
             tmpLine = tmpLine.trim();
-            try
-            {
-                Date date = BAZAAR_TIME_FORMAT.parse( tmpLine );
-                currentChange.setDate( date );
-            }
-            catch ( ParseException e )
-            {
-                logger.warn( "Could not figure out of date: " + tmpLine );
-            }
+            Date date = parseDate( tmpLine, userDatePattern, BAZAAR_TIME_PATTERN );
+            currentChange.setDate( date );
         }
         else if ( line.startsWith( MESSAGE_TOKEN ) )
         {
@@ -144,7 +139,7 @@
         }
         else
         {
-            logger.warn( "Could not figure out of: " + line );
+            getLogger().warn( "Could not figure out of: " + line );
         }
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/status/BazaarStatusConsumer.java Thu Feb  2 03:59:40 2006
@@ -63,16 +63,16 @@
         File tmpFile = new File( workingDir, trimmedLine );
         if ( !tmpFile.exists() )
         {
-            logger.info( "Not a file: " + tmpFile + ". Ignoring" );
+            getLogger().info( "Not a file: " + tmpFile + ". Ignoring" );
         }
         else if ( tmpFile.isDirectory() )
         {
-            logger.info( "New directory added: " + tmpFile );
+            getLogger().info( "New directory added: " + tmpFile );
         }
         else
         {
             ScmFile scmFile = new ScmFile( trimmedLine, currentState );
-            logger.info( scmFile.toString() );
+            getLogger().info( scmFile.toString() );
             repositoryStatus.add( scmFile );
         }
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -81,13 +81,14 @@
     // ----------------------------------------------------------------------
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
         getLogger().debug( "executing changelog command..." );
         Commandline cl = createCommandLine( fileSet.getBasedir(), branch, startDate );
 
-        ClearCaseChangeLogConsumer consumer = new ClearCaseChangeLogConsumer( getLogger() );
+        ClearCaseChangeLogConsumer consumer = new ClearCaseChangeLogConsumer( getLogger(), datePattern );
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -19,10 +19,8 @@
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
 import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.cli.StreamConsumer;
+import org.apache.maven.scm.util.AbstractConsumer;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -32,14 +30,12 @@
  * @version $Id$
  */
 public class ClearCaseChangeLogConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
-    private ScmLogger logger;
-
     /**
      * Formatter used to parse Clearcase date/timestamp.
      */
-    private static final SimpleDateFormat CLEARCASE_TIMESTAMP_FORMAT = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
+    private static final String CLEARCASE_TIMESTAMP_PATTERN = "yyyyMMdd.HHmmss";
 
     private static final String NAME_TAG = "NAME:";
 
@@ -83,13 +79,17 @@
      */
     private ChangeFile currentFile = null;
 
+    private String userDatePattern;
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    public ClearCaseChangeLogConsumer( ScmLogger logger )
+    public ClearCaseChangeLogConsumer( ScmLogger logger, String userDatePattern )
     {
-        this.logger = logger;
+        super( logger );
+
+        this.userDatePattern = userDatePattern;
     }
 
     // ----------------------------------------------------------------------
@@ -119,7 +119,7 @@
                 processGetCommentAndUser( line );
                 break;
             default:
-                logger.warn( "Unknown state: " + status );
+                getLogger().warn( "Unknown state: " + status );
         }
     }
 
@@ -151,14 +151,9 @@
     {
         if ( line.startsWith( DATE_TAG ) )
         {
-            try
-            {
-                getCurrentChange().setDate( CLEARCASE_TIMESTAMP_FORMAT.parse( line.substring( DATE_TAG.length() ) ) );
-            }
-            catch ( ParseException e )
-            {
-                e.printStackTrace();
-            }
+            getCurrentChange().setDate(
+                parseDate( line.substring( DATE_TAG.length() ), userDatePattern, CLEARCASE_TIMESTAMP_PATTERN ) );
+
             setStatus( GET_COMMENT );
         }
     }
@@ -227,7 +222,7 @@
     /**
      * Setter for property currentLogEntry.
      *
-     * @param currentLogEntry New value of property currentLogEntry.
+     * @param currentChange New value of property currentLogEntry.
      */
     private void setCurrentChange( ChangeSet currentChange )
     {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommand.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/changelog/CvsChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -41,21 +41,23 @@
     implements CvsCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          String startTag, String endTag )
+                                                          String startTag, String endTag, String datePattern )
         throws ScmException
     {
-        return executeChangeLogCommand( repo, fileSet, null, null, null, startTag, endTag );
+        return executeChangeLogCommand( repo, fileSet, null, null, null, startTag, endTag, datePattern );
     }
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
-        return executeChangeLogCommand( repo, fileSet, startDate, endDate, branch, null, null );
+        return executeChangeLogCommand( repo, fileSet, startDate, endDate, branch, null, null, datePattern );
     }
 
     private ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, Date startDate,
-                                                        Date endDate, String branch, String startTag, String endTag )
+                                                        Date endDate, String branch, String startTag, String endTag,
+                                                        String datePattern )
         throws ScmException
     {
         CvsScmProviderRepository repository = (CvsScmProviderRepository) repo;
@@ -111,7 +113,7 @@
             cl.createArgument().setValue( param );
         }
 
-        CvsChangeLogConsumer consumer = new CvsChangeLogConsumer( getLogger() );
+        CvsChangeLogConsumer consumer = new CvsChangeLogConsumer( getLogger(), datePattern );
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumer.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/changelog/CvsChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -18,6 +18,7 @@
 
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
+import org.apache.maven.scm.util.AbstractConsumer;
 import org.apache.maven.scm.log.ScmLogger;
 import org.codehaus.plexus.util.cli.StreamConsumer;
 
@@ -31,7 +32,7 @@
  * @version $Id$
  */
 public class CvsChangeLogConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
     private List entries = new ArrayList();
 
@@ -98,11 +99,13 @@
      */
     private ChangeFile currentFile = null;
 
-    private ScmLogger logger;
+    private String userDatePattern;
 
-    public CvsChangeLogConsumer( ScmLogger logger )
+    public CvsChangeLogConsumer( ScmLogger logger, String userDatePattern )
     {
-        this.logger = logger;
+        super( logger);
+
+        this.userDatePattern = userDatePattern;
     }
 
     public List getModifications()
@@ -134,7 +137,7 @@
         }
         catch ( Throwable ex )
         {
-            logger.warn( "Exception in the cvs changelog consumer.", ex );
+            getLogger().warn( "Exception in the cvs changelog consumer.", ex );
         }
     }
 
@@ -211,7 +214,7 @@
             tokenizer.nextToken(); // date tag
             String date = tokenizer.nextToken();
             String time = tokenizer.nextToken();
-            getCurrentChange().setDate( date + " " + time );
+            getCurrentChange().setDate( date + " " + time, userDatePattern );
             tokenizer.nextToken(); // author tag
             // assumes author can't contain spaces
             String author = tokenizer.nextToken();

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumerTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumerTest.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumerTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogConsumerTest.java Thu Feb  2 03:59:40 2006
@@ -60,7 +60,7 @@
     public void testParse()
         throws Exception
     {
-        CvsChangeLogConsumer command = new CvsChangeLogConsumer( null );
+        CvsChangeLogConsumer command = new CvsChangeLogConsumer( null, null );
 
         FileInputStream fis = new FileInputStream( testFile );
         BufferedReader in = new BufferedReader( new InputStreamReader( fis ) );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.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/changelog/LocalChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -44,7 +44,8 @@
     extends AbstractChangeLogCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
         LocalScmProviderRepository repo = (LocalScmProviderRepository) repository;

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -44,7 +44,8 @@
     implements PerforceCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
         if ( StringUtils.isNotEmpty( branch ) )
@@ -54,14 +55,15 @@
 
         Commandline cl = createCommandLine( (PerforceScmProviderRepository) repo, fileSet.getBasedir() );
 
-        PerforceChangeLogConsumer consumer = new PerforceChangeLogConsumer( startDate, endDate );
+        PerforceChangeLogConsumer consumer =
+            new PerforceChangeLogConsumer( startDate, endDate, datePattern, getLogger() );
 
         try
         {
             getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) );
             Process proc = cl.execute();
             BufferedReader br = new BufferedReader( new InputStreamReader( proc.getInputStream() ) );
-            String line = null;
+            String line;
             while ( ( line = br.readLine() ) != null )
             {
                 consumer.consumeLine( line );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/main/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -18,12 +18,11 @@
 
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
+import org.apache.maven.scm.log.ScmLogger;
+import org.apache.maven.scm.util.AbstractConsumer;
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
-import org.codehaus.plexus.util.cli.StreamConsumer;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -33,12 +32,12 @@
  * @version $Id$
  */
 public class PerforceChangeLogConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
     /**
      * Date formatter for perforce timestamp
      */
-    private static final SimpleDateFormat PERFORCE_TIMESTAMP = new SimpleDateFormat( "yyyy/MM/dd HH:mm:ss" );
+    private static final String PERFORCE_TIMESTAMP_PATTERN = "yyyy/MM/dd HH:mm:ss";
 
     private List entries = new ArrayList();
 
@@ -91,24 +90,30 @@
 
     private Date endDate;
 
+    private String userDatePattern;
+
     private static final String pattern = "^\\.\\.\\. #(\\d+) " + // revision number
         "change (\\d+) .* " + // changelist number
         "on (.*) " + // date
         "by (.*)@"; // author
 
-    public PerforceChangeLogConsumer( Date startDate, Date endDate )
+    public PerforceChangeLogConsumer( Date startDate, Date endDate, String userDatePattern, ScmLogger logger )
     {
+        super( logger );
+
         this.startDate = startDate;
 
         this.endDate = endDate;
 
+        this.userDatePattern = userDatePattern;
+
         try
         {
             revisionRegexp = new RE( pattern );
         }
         catch ( RESyntaxException ignored )
         {
-            //LOG.error("Could not create regexp to parse perforce log file", ignored);
+            getLogger().error( "Could not create regexp to parse perforce log file", ignored );
         }
     }
 
@@ -151,9 +156,9 @@
      * Add a change log entry to the list (if it's not already there)
      * with the given file.
      *
-     * @param entry a {@link ChangeLogEntry} to be added to the list if another
+     * @param entry a {@link ChangeSet} to be added to the list if another
      *              with the same key (p4 change number) doesn't exist already.
-     * @param file  a {@link ChangeLogFile} to be added to the entry
+     * @param file  a {@link ChangeFile} to be added to the entry
      */
     private void addEntry( ChangeSet entry, ChangeFile file )
     {
@@ -202,7 +207,7 @@
 
         currentChange = new ChangeSet();
 
-        currentChange.setDate( parseDate( revisionRegexp.getParen( 3 ) ) );
+        currentChange.setDate( parseDate( revisionRegexp.getParen( 3 ), userDatePattern, PERFORCE_TIMESTAMP_PATTERN ) );
 
         currentChange.setAuthor( revisionRegexp.getParen( 4 ) );
 
@@ -226,25 +231,6 @@
         else
         {
             currentChange.setComment( currentChange.getComment() + line + "\n" );
-        }
-    }
-
-    /**
-     * Converts the date timestamp from the perforce output into a date
-     * object.
-     *
-     * @return A date representing the timestamp of the log entry.
-     */
-    private Date parseDate( String date )
-    {
-        try
-        {
-            return PERFORCE_TIMESTAMP.parse( date );
-        }
-        catch ( ParseException e )
-        {
-            //LOG.error("ParseException Caught", e);
-            return null;
         }
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumerTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumerTest.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumerTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogConsumerTest.java Thu Feb  2 03:59:40 2006
@@ -19,6 +19,7 @@
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
 import org.apache.maven.scm.ScmTestCase;
+import org.apache.maven.scm.log.DefaultLog;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -38,7 +39,7 @@
     {
         File testFile = getTestFile( "src/test/resources/perforce/perforcelog.txt" );
 
-        PerforceChangeLogConsumer consumer = new PerforceChangeLogConsumer( null, null );
+        PerforceChangeLogConsumer consumer = new PerforceChangeLogConsumer( null, null, null, new DefaultLog() );
 
         FileInputStream fis = new FileInputStream( testFile );
         BufferedReader in = new BufferedReader( new InputStreamReader( fis ) );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java Thu Feb  2 03:59:40 2006
@@ -45,7 +45,8 @@
     // ----------------------------------------------------------------------
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
 
@@ -59,7 +60,8 @@
         // TODO: revision
         Commandline cl = createCommandLine( repository, fileSet.getBasedir(), startDate );
 
-        StarteamChangeLogConsumer consumer = new StarteamChangeLogConsumer( getLogger(), startDate, endDate );
+        StarteamChangeLogConsumer consumer =
+            new StarteamChangeLogConsumer( getLogger(), startDate, endDate, datePattern );
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -19,9 +19,8 @@
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
 import org.apache.maven.scm.log.ScmLogger;
-import org.codehaus.plexus.util.cli.StreamConsumer;
+import org.apache.maven.scm.util.AbstractConsumer;
 
-import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -32,10 +31,8 @@
  * @version $Id$
  */
 public class StarteamChangeLogConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
-    private ScmLogger logger;
-
     private SimpleDateFormat localFormat = new SimpleDateFormat();
 
     private List entries = new ArrayList();
@@ -118,18 +115,22 @@
      */
     private Date endDate;
 
+    private String userDateFormat;
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    public StarteamChangeLogConsumer( ScmLogger logger, Date startDate, Date endDate )
+    public StarteamChangeLogConsumer( ScmLogger logger, Date startDate, Date endDate, String userDateFormat )
     {
-        this.logger = logger;
+        super( logger );
 
         this.startDate = startDate;
 
         this.endDate = endDate;
 
+        this.userDateFormat = userDateFormat;
+
         //work around for all en_US compatible locales, where Starteam
         // stcmd hist output uses a different format, ugly eh?
         // makesure to change the test file as well if this ever got fixed
@@ -155,7 +156,7 @@
 
     public void consumeLine( String line )
     {
-        logger.debug( line );
+        getLogger().debug( line );
 
         // current state transitions in the state machine - starts with Get File
         //      Get File                -> Get Revision
@@ -189,10 +190,10 @@
      * Add a change log entry to the list (if it's not already there)
      * with the given file.
      *
-     * @param entry a {@link ChangeLogEntry} to be added to the list if another
+     * @param entry a {@link ChangeSet} to be added to the list if another
      *              with the same key doesn't exist already. If the entry's author
      *              is null, the entry wont be added
-     * @param file  a {@link ChangeLogFile} to be added to the entry
+     * @param file  a {@link ChangeFile} to be added to the entry
      */
     private void addEntry( ChangeSet entry, ChangeFile file )
     {
@@ -278,7 +279,7 @@
 
             String date = line.substring( posDateTag + DATE_TAG.length() );
 
-            getCurrentChange().setDate( parseDate( date ) );
+            getCurrentChange().setDate( parseDate( date, userDateFormat, null ) );
 
             setStatus( GET_COMMENT );
         }
@@ -375,25 +376,5 @@
     private void setStatus( int status )
     {
         this.status = status;
-    }
-
-    /**
-     * Converts the date timestamp from the svn output into a date
-     * object.
-     *
-     * @return A date representing the timestamp of the log entry.
-     */
-    private Date parseDate( String date )
-    {
-        try
-        {
-            return localFormat.parse( date.toString() );
-        }
-        catch ( ParseException e )
-        {
-            logger.error( "ParseException Caught", e );
-
-            return null;
-        }
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java Thu Feb  2 03:59:40 2006
@@ -61,7 +61,7 @@
 
         String s = in.readLine();
 
-        StarteamChangeLogConsumer consumer = new StarteamChangeLogConsumer( new DefaultLog(), null, null );
+        StarteamChangeLogConsumer consumer = new StarteamChangeLogConsumer( new DefaultLog(), null, null, null );
 
         while ( s != 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=374369&r1=374368&r2=374369&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 Thu Feb  2 03:59:40 2006
@@ -46,13 +46,14 @@
     private final static String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss Z";
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch )
+                                                          Date startDate, Date endDate, String branch,
+                                                          String datePattern )
         throws ScmException
     {
         Commandline cl =
             createCommandLine( (SvnScmProviderRepository) repo, fileSet.getBasedir(), branch, startDate, endDate );
 
-        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer();
+        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer( getLogger(), datePattern );
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumer.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/SvnChangeLogConsumer.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumer.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/main/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumer.java Thu Feb  2 03:59:40 2006
@@ -17,13 +17,12 @@
  */
 
 import org.apache.maven.scm.ChangeFile;
+import org.apache.maven.scm.log.ScmLogger;
 import org.apache.maven.scm.provider.svn.SvnChangeSet;
+import org.apache.maven.scm.util.AbstractConsumer;
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
-import org.codehaus.plexus.util.cli.StreamConsumer;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -33,12 +32,12 @@
  * @version $Id$
  */
 public class SvnChangeLogConsumer
-    implements StreamConsumer
+    extends AbstractConsumer
 {
     /**
      * Date formatter for svn timestamp (after a little massaging)
      */
-    private static final SimpleDateFormat SVN_TIMESTAMP = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss zzzzzzzzz" );
+    private static final String SVN_TIMESTAMP_PATTERN = "yyyy-MM-dd HH:mm:ss zzzzzzzzz";
 
     /**
      * State machine constant: expecting header
@@ -123,11 +122,17 @@
 
     private RE headerRegexp2;
 
+    private String userDateFormat;
+
     /**
      * Default constructor.
      */
-    public SvnChangeLogConsumer()
+    public SvnChangeLogConsumer( ScmLogger logger, String userDateFormat )
     {
+        super( logger );
+
+        this.userDateFormat = userDateFormat;
+
         try
         {
             headerRegexp = new RE( pattern );
@@ -264,17 +269,10 @@
      */
     private Date parseDate()
     {
-        try
-        {
-            StringBuffer date = new StringBuffer().append( headerRegexp.getParen( 3 ) ).append( " GMT" )
-                .append( headerRegexp.getParen( 4 ) ).append( headerRegexp.getParen( 5 ) ).append( ':' )
-                .append( headerRegexp.getParen( 6 ) );
+        StringBuffer date = new StringBuffer().append( headerRegexp.getParen( 3 ) ).append( " GMT" )
+            .append( headerRegexp.getParen( 4 ) ).append( headerRegexp.getParen( 5 ) ).append( ':' )
+            .append( headerRegexp.getParen( 6 ) );
 
-            return SVN_TIMESTAMP.parse( date.toString() );
-        }
-        catch ( ParseException e )
-        {
-            return null;
-        }
+        return parseDate( date.toString(), userDateFormat, SVN_TIMESTAMP_PATTERN );
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumerTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumerTest.java?rev=374369&r1=374368&r2=374369&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumerTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogConsumerTest.java Thu Feb  2 03:59:40 2006
@@ -18,6 +18,7 @@
 
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
+import org.apache.maven.scm.log.DefaultLog;
 import org.codehaus.plexus.PlexusTestCase;
 
 import java.io.BufferedReader;
@@ -36,7 +37,7 @@
     public void testConsumerWithPattern1()
         throws Exception
     {
-        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer();
+        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer( new DefaultLog(), null );
 
         File f = getTestFile( "/src/test/resources/svn/changelog/svnlog.txt" );
 
@@ -94,7 +95,7 @@
     public void testConsumerWithPattern2()
         throws Exception
     {
-        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer();
+        SvnChangeLogConsumer consumer = new SvnChangeLogConsumer( new DefaultLog(), null );
 
         File f = getTestFile( "/src/test/resources/svn/changelog/svnlog2.txt" );
 



Mime
View raw message