ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib ChangeLog.java ChangeLogParser.java
Date Tue, 02 Apr 2002 09:19:07 GMT
donaldp     02/04/02 01:19:07

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/cvslib
                        ChangeLog.java ChangeLogParser.java
  Log:
  Log errors rather than ignoring them.
  
  Submitted by: dion@multitask.com.au via "Vincent Massol" <vmassol@octo.com>
  
  Revision  Changes    Path
  1.7       +7 -8      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java
  
  Index: ChangeLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ChangeLog.java	30 Mar 2002 23:51:54 -0000	1.6
  +++ ChangeLog.java	2 Apr 2002 09:19:06 -0000	1.7
  @@ -14,12 +14,12 @@
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.io.UnsupportedEncodingException;
  +import java.text.SimpleDateFormat;
  +import java.util.ArrayList;
  +import java.util.Date;
   import java.util.Enumeration;
   import java.util.Properties;
   import java.util.Vector;
  -import java.util.ArrayList;
  -import java.util.Date;
  -import java.text.SimpleDateFormat;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.io.IOUtil;
  @@ -28,7 +28,6 @@
   import org.apache.myrmidon.framework.Execute;
   import org.apache.myrmidon.framework.FileSet;
   import org.apache.tools.todo.types.Commandline;
  -import org.apache.tools.todo.types.DirectoryScanner;
   
   /**
    * Change log task.
  @@ -57,7 +56,7 @@
    *
    * @author <a href="mailto:jeff.martin@synamic.co.uk">Jeff Martin</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/03/30 23:51:54 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/02 09:19:06 $
    * @ant.task name="changelog"
    */
   public class ChangeLog
  @@ -220,7 +219,7 @@
           }
           */
   
  -        final ChangeLogParser parser = new ChangeLogParser( userList );
  +        final ChangeLogParser parser = new ChangeLogParser( userList, getContext() );
           final Execute exe = new Execute();
           exe.setWorkingDirectory( m_dir );
           exe.setCommandline( command );
  @@ -297,7 +296,7 @@
           final ArrayList results = new ArrayList();
           for( int i = 0; i < entrySet.length; i++ )
           {
  -            final CVSEntry cvsEntry = entrySet[i ];
  +            final CVSEntry cvsEntry = entrySet[ i ];
               final Date date = cvsEntry.getDate();
               if( null != m_start && m_start.after( date ) )
               {
  @@ -312,7 +311,7 @@
               results.add( cvsEntry );
           }
   
  -        return (CVSEntry[])results.toArray( new CVSEntry[results.size() ] );
  +        return (CVSEntry[])results.toArray( new CVSEntry[ results.size() ] );
       }
   
       /**
  
  
  
  1.4       +10 -5     jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogParser.java
  
  Index: ChangeLogParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChangeLogParser.java	1 Apr 2002 06:29:04 -0000	1.3
  +++ ChangeLogParser.java	2 Apr 2002 09:19:06 -0000	1.4
  @@ -12,15 +12,16 @@
   import java.util.Date;
   import java.util.Hashtable;
   import java.util.Properties;
  -import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.aut.nativelib.ExecOutputHandler;
  +import org.apache.avalon.excalibur.i18n.ResourceManager;
  +import org.apache.avalon.excalibur.i18n.Resources;
  +import org.apache.myrmidon.api.TaskContext;
   
   /**
    * A class used to parse the output of the CVS log command.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/04/01 06:29:04 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/02 09:19:06 $
    */
   class ChangeLogParser
       implements ExecOutputHandler
  @@ -48,6 +49,8 @@
   
       private int m_status = GET_FILE;
   
  +    private final TaskContext m_context;
  +
       /** rcs entries */
       private final Hashtable m_entries = new Hashtable();
   
  @@ -58,9 +61,11 @@
        *
        * @param userList the userlist
        */
  -    public ChangeLogParser( Properties userList )
  +    ChangeLogParser( final Properties userList,
  +                     final TaskContext context )
       {
           m_userList = userList;
  +        m_context = context;
       }
   
       /**
  @@ -80,7 +85,7 @@
        */
       public void stderr( String line )
       {
  -        //ignore
  +        m_context.error( line );
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message