The command passed by cvstagdiff to cvs when using the startdate and enddate attributes is incorrect when using a cvs date formatted as "dd-MM-yy hh:mm:ss". The command passed to cvs does not take into account the consequences of the space separating the two portions of the date/time value. The command passed to cvs is: cvs rdiff -s -D 2003-01-10 12:15:19 -D 2003-01-10 14:50:31 <package> when it should be: cvs rdiff -s -D '2003-01-10 12:15:19' -D '2003-01-10 14:50:31' <package> With the incorrect form of the command, cvs reports (via the ant log.xml file) that '12:15:19' '-D' '2003-01-10' and '14:50:31' are unknown module names. One workaround is to add the quotes in the startdate and enddate attributes value in the build.xml, but this is clumsy and not really obvious: <cvstagdiff startdate = "'2003-01-10 12:15:19'" ... etc A better fix is to correct the code in CvsTagDiff.java (lines 309 to 313 - in the 'execute' method) from: String rdiff = "rdiff -s " + (m_startTag != null ? ("-r " + m_startTag) : ("-D " + m_startDate)) + " " + (m_endTag != null ? ("-r " + m_endTag) : ("-D " + m_endDate)) + " " + m_package; to: String rdiff = "rdiff -s " + (m_startTag != null ? ("-r " + m_startTag) : ("-D '" + m_startDate + "'")) + " " + (m_endTag != null ? ("-r " + m_endTag) : ("-D '" + m_endDate + "'")) + " " + m_package; I have tested this fix on a local build of Ant 1.5.1 (Windows 2000, Java 1.4) and the problem is cured. I'm not sure if this fix takes into account cvs running on different OSes.
Created attachment 6841 [details] code patch
Changed version to 1.6Alpha since that's where I fixed it. Please verify this on the main trunk once the patch is committed. Don't know if we want to apply this to the 1.5.x branch as well.
patch submitted, thanks. I do not know if and when there will be a new 1.5.x version. My understanding is that the next ant version will be ant 1.6
*** Bug 24282 has been marked as a duplicate of this bug. ***