conor 2003/02/20 16:19:22
Modified: src/main/org/apache/tools/ant/taskdefs/cvslib Tag: ANT_15_BRANCH ChangeLogTask.java Log: Roll back Revision Changes Path No revision No revision 1.14.2.6 +4 -89 ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java Index: ChangeLogTask.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java,v retrieving revision 1.14.2.5 retrieving revision 1.14.2.6 diff -u -w -u -r1.14.2.5 -r1.14.2.6 --- ChangeLogTask.java 20 Feb 2003 14:35:43 -0000 1.14.2.5 +++ ChangeLogTask.java 21 Feb 2003 00:19:22 -0000 1.14.2.6 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002-2003 The Apache Software Foundation. All rights + * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,7 +61,6 @@ import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.text.SimpleDateFormat; -import java.text.ParseException; import java.util.Date; import java.util.Enumeration; import java.util.Properties; @@ -101,7 +100,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Martin</a> * @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Ken Gentle</a> + * @version $Revision$ $Date$ * @since Ant 1.5 * @ant.task name="cvschangelog" */ @@ -121,33 +120,16 @@ /** The earliest date at which to start processing entrys. */ private Date m_start; - /** - * The start date as a string, possibly to be interpreted according - * to a format - */ - private String m_startDate; - - /** The latest date at which to stop processing entrys. */ private Date m_stop; /** - * The stop date as a string - */ - private String m_stopDate; - - /** * Filesets containting list of files against which the cvs log will be * performed. If empty then all files will in the working directory will * be checked. */ private final Vector m_filesets = new Vector(); - /** - * The <code>SimpleDateFormat</code> pattern to be used in parsing date - * attributes - */ - private String m_datePattern = "yyyy-MM-dd"; /** * Set the base dir for cvs. @@ -231,61 +213,6 @@ m_filesets.addElement(fileSet); } - /** - * <code>SimpleDateFormat</code> pattern to be used in parsing date - * attributes. - * - * @param pattern <code>SimpleDateFormat</code> pattern. - */ - public void setDatePattern(final String datePattern) { - m_datePattern = datePattern; - } - - /** - * - * @param startDate - */ - public void setStartDate(final String startDate) { - m_startDate = startDate; - } - - public void setEndDate(final String stopDate) { - m_stopDate = stopDate; - } - - private void determineDates() { - SimpleDateFormat format; - try { - format = new SimpleDateFormat(m_datePattern); - } catch (IllegalArgumentException iae) { - final String message = "Illegal SimpleDateFormat pattern '" - + m_datePattern + "'"; - throw new BuildException(message); - } - - - if (m_startDate != null) { - try { - m_start = format.parse(m_startDate); - } catch (ParseException e) { - final String message = "Can't parse date '" + m_startDate - + "' with pattern '" + m_datePattern + "'"; - throw new BuildException(message); - } - } - - if (m_stopDate != null) { - try { - m_stop = format.parse(m_stopDate); - } catch (ParseException e) { - final String message = "Can't parse date '" + m_stopDate - + "' with pattern '" + m_datePattern + "'"; - throw new BuildException(message); - } - } - - } - /** * Execute task @@ -299,7 +226,6 @@ try { validate(); - determineDates(); final Properties userList = new Properties(); @@ -361,8 +287,7 @@ final int resultCode = exe.execute(); if (0 != resultCode) { - throw new BuildException("Error running cvs log - " - + "command returned '"+resultCode+"'"); + throw new BuildException("Error running cvs log"); } } catch (final IOException ioe) { throw new BuildException(ioe.toString()); @@ -412,16 +337,6 @@ + m_usersFile.getAbsolutePath(); throw new BuildException(message); - } - - if (m_start != null && m_startDate != null) { - throw new BuildException("You cannot specify the start date using " - + "both \"startdate\" and \"start\" (or \"daysinpast\")"); - } - - if (m_stop != null && m_stopDate != null) { - throw new BuildException("You cannot specify the stop date using " - + "both \"stopdate\" and \"stop\""); } }