Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Bugzill 40704, fix for cygwin version of svn dealing with dates
git-svn-id: https://svn.apache.org/repos/asf/ant/antlibs/svn/trunk@463852 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Peter Reilly committed Oct 13, 2006
1 parent 86dde49 commit 8f80cd0e0efc842437e8f74328c544e778e32c5d
Showing 1 changed file with 14 additions and 2 deletions.
@@ -35,6 +35,7 @@
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.LogOutputStream;
import org.apache.tools.ant.taskdefs.PumpStreamHandler;
import org.apache.tools.ant.taskdefs.condition.Os;
import org.apache.tools.ant.taskdefs.cvslib.CvsUser;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.util.FileUtils;
@@ -68,6 +69,9 @@
* @ant.task name="svnchangelog" category="scm"
*/
public class SvnChangeLogTask extends AbstractSvnTask {
// ? On windows ?
private static final boolean ON_WINDOWS = Os.isFamily("windows");

/** User list */
private File usersFile;

@@ -165,7 +169,16 @@ public void setDaysinpast(final int days) {

final SimpleDateFormat outputDate =
new SimpleDateFormat("{yyyy-MM-dd}");
setStart(outputDate.format(new Date(time)));
String formattedDate = outputDate.format(new Date(time));
if (ON_WINDOWS) {
// BugZilla: 40704
// http://issues.apache.org/bugzilla/show_bug.cgi?id=40704
// cygwin svn has a bug in handling parameters with {}
// putting quotes around the date fixes this, the
// fix also works for the normal svn cli command.
formattedDate = "\"" + formattedDate + "\"";
}
setStart(formattedDate);
}


@@ -397,4 +410,3 @@ private boolean isBeforeEndRevision(SvnEntry entry) {
return true;
}
}

0 comments on commit 8f80cd0

Please sign in to comment.