From 092cd9e58fc782bb605411cddc161bb7cec549b8 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 18 Nov 2002 12:02:27 +0000 Subject: [PATCH] The cvschangelog task doesn't seem to report changes for the current calendar day. The problem lies in the fact that the exec'ed cvs command is in the form: > cvs log "-d >=2002-11-7" rather than: > cvs log -d ">=2002-11-7" The two commands return different results when changes have been made today! PR: 14397 Submitted by: Paul Berrevoets git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273550 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 2 ++ .../apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 3aba922d7..c1026d229 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -53,6 +53,8 @@ Fixed bugs: * would throw a NullPointException if there had been no differences. +* could miss today's changes. + Other changes: -------------- * lets you set the username and password for proxies that want authentication diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java index dd9d2c9a8..8b0b43ab7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java @@ -249,9 +249,10 @@ public class ChangeLogTask extends Task { new SimpleDateFormat("yyyy-MM-dd"); // We want something of the form: -d ">=YYYY-MM-dd" - final String dateRange = "-d >=" - + outputDate.format(m_start); + final String dateRange = ">=" + outputDate.format(m_start); + // Supply '-d' as a separate argument - Bug# 14397 + command.createArgument().setValue("-d"); command.createArgument().setValue(dateRange); } @@ -275,8 +276,7 @@ public class ChangeLogTask extends Task { final RedirectingStreamHandler handler = new RedirectingStreamHandler(parser); - log("ChangeLog command: [" + command.toString() + "]", - Project.MSG_VERBOSE); + log(command.describeCommand(), Project.MSG_VERBOSE); final Execute exe = new Execute(handler);