ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Patch for 22863 (efficent rename of dirs) breaks Gump build
Date Mon, 20 Sep 2004 08:26:50 GMT

the fix for 22863 which allows <move>'s file attribute to point to a
directory breaks the tomcat-dbcp build in Gump:

The build does this:

  <move todir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp">
    <fileset dir="${tomcat-dbcp.home}/src/java/org/apache/commons" />

where ${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp exists prior
to invoking the task.  This assumes that all files and directories
from below ${tomcat-dbcp.home}/src/java/org/apache/commons will get
moved and it works for all older versions of Ant.

Since the fileset matches all files and directories and neither of
them is present in the dbcp directory before the move (in fact it is
empty), ${tomcat-dbcp.home}/src/java/org/apache/commons is added to
completeDirMap and renameFile is tried.

With the fix for 22863 renameFile has been changed to throw a
BuildException if we try to rename a directory to an existing
directory (thus the failure above) while the old code would simply
return false and make Ant take the hard route of copying all files

It would be easy to revert the changes made to renameFile around line
385 - and I've confirmed that it will make the Tomcat build pass again
- but I'm afraid I'm missing something.  In particular since it will
break testCompleteDirectoryMoveFileToDirWithExistingDir in MoveTest.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message