DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12632>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12632 [PATCH] New <lsync> to synchronize a local directory from one or more <fileset>s Summary: [PATCH] New <lsync> to synchronize a local directory from one or more <fileset>s Product: Ant Version: 1.5.1Beta1 Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Uses internally the <copy> task to perform all the copies, and then removes from the destination directory all the files (and optionally empty directories when includeEmptyDirs in not true) which have not been selected by the input <fileset>s (what I call dangling files). Note that not all attributes/sub-elements of <copy> are exposed in <lsync>, as filter chains, mappers, and global filtering would interfere with the syncing. Also not that is as the same limitations as <copy> (since using it), so an existing destination file having the same date as its source while still being different will not be copied... Also, since multiple filesets are allowed by <copy>, one could have several source files for a single destination file... Behavior is undetermined in this case! Hope someone finds this useful. Thanks, --DD Sample usage: <target name="sources" depends="-buildmagic" description="Copies the sources from DS_HOME for this module"> <mkdir dir="${src}" /> <lsync todir="${src}"> <fileset refid="sources" /> </lsync> </target> Sample output: sources: Removed 120 dangling files from P:\com_lgc\dsp\dsp-core\da\src Removed 40 empty directories from P:\com_lgc\dsp\dsp-core\da\src When no files not present in the source input fileset exist, the output is the same as <copy>. When such files exist, output is as above. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
