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 ChangeLogWriter.java ChangeLogParser.java
Date Thu, 04 Apr 2002 10:33:20 GMT
donaldp     02/04/04 02:33:19

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/cvslib
                        ChangeLogWriter.java ChangeLogParser.java
  Log:
  Fixed the following bug;
  
  processGetPreviousRevision method sets the status to GET_COMMENT but it should set it to
  GET_DATE otherwise the date information gets put in the comment and as the author is
  escaped using a CDATA, you finally get a CDATA inside a CDATA...
  
  Submitted By: Frederic Lavigne <fred@castify.net>
  
  Revision  Changes    Path
  1.2       +3 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogWriter.java
  
  Index: ChangeLogWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLogWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChangeLogWriter.java	24 Mar 2002 02:24:00 -0000	1.1
  +++ ChangeLogWriter.java	4 Apr 2002 10:33:19 -0000	1.2
  @@ -15,7 +15,7 @@
    * Class used to generate an XML changelog.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/24 02:24:00 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/04 10:33:19 $
    */
   class ChangeLogWriter
   {
  @@ -51,7 +51,7 @@
           output.println( "\t<entry>" );
           output.println( "\t\t<date>" + c_outputDate.format( entry.getDate() ) + "</date>"
);
           output.println( "\t\t<time>" + c_outputTime.format( entry.getDate() ) + "</time>"
);
  -        output.println( "\t\t<author>" + entry.getAuthor() + "</author>" );
  +        output.println( "\t\t<author><![CDATA[" + entry.getAuthor() + "]]></author>"
);
   
           final Iterator iterator = entry.getFiles().iterator();
           while( iterator.hasNext() )
  @@ -69,7 +69,7 @@
   
               output.println( "\t\t</file>" );
           }
  -        output.println( "\t\t<msg>" + entry.getComment() + "</msg>" );
  +        output.println( "\t\t<msg><![CDATA[" + entry.getComment() + "]]></msg>"
);
           output.println( "\t</entry>" );
       }
   }
  
  
  
  1.5       +3 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChangeLogParser.java	2 Apr 2002 09:19:06 -0000	1.4
  +++ ChangeLogParser.java	4 Apr 2002 10:33:19 -0000	1.5
  @@ -21,7 +21,7 @@
    * 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.4 $ $Date: 2002/04/02 09:19:06 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/04 10:33:19 $
    */
   class ChangeLogParser
       implements ExecOutputHandler
  @@ -131,7 +131,6 @@
               //so we can save it
               final int end = m_comment.length() - lineSeparator.length(); //was -1
               m_comment = m_comment.substring( 0, end );
  -            m_comment = "<![CDATA[" + m_comment + "]]>";
               saveEntry();
               m_status = GET_FILE;
           }
  @@ -139,7 +138,6 @@
           {
               final int end = m_comment.length() - lineSeparator.length(); //was -1
               m_comment = m_comment.substring( 0, end );
  -            m_comment = "<![CDATA[" + m_comment + "]]>";
               m_status = GET_PREVIOUS_REV;
           }
           else
  @@ -197,7 +195,7 @@
   
               if( m_userList.containsKey( m_author ) )
               {
  -                m_author = "<![CDATA[" + m_userList.getProperty( m_author ) + "]]>";
  +                m_author = m_userList.getProperty( m_author );
               }
   
               m_status = GET_COMMENT;
  @@ -226,7 +224,7 @@
           saveEntry();
   
           m_revision = m_previousRevision;
  -        m_status = GET_COMMENT;
  +        m_status = GET_DATE;
       }
   
       /**
  
  
  

--
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