Darn, beat me to it...

-----Original Message-----
From: Ed Mack [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 5:35 PM
To: 'Ant Users List'
Subject: RE: Synchronize task


Speaking just to the issue of deleting target files which are no longer in
the source directory, you could use a fileset with the "present" selector,
but reversing the source/target directories:

<delete>
  <fileset dir="${target_dir}">
    <present present="srconly" targetdir="${source_dir}"/>
  </fileset>
</delete>

Ed

> -----Original Message-----
> From: Dominique Devienne [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 16, 2003 2:17 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> Syncing requires deleting files from the target directories no longer
> present from the source directories, and since <copy> accepts 
> <fileset>s
> which do not necessarily include all files of the source 
> directories, this
> complicates things a bit. <lsync> takes care of this nicely AFAIK.
> 
> I'm afraid no amount of <fileset> refinement can delete any 
> files from the
> targets directories no longer present from the source 
> directories (or no
> longer included in the fileset), which is the only advantage 
> <lsync> has
> over <copy>.
> 
> Sorry if my previous post offended you. Cheers, --DD
> 
> -----Original Message-----
> From: Ciramella, Edward [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 16, 2003 4:07 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> ..."since that copies possibly unneeded files"...
> 
> Ok, well if you just want to sync up the files/folders, maybe 
> the fileset
> that you are using needs more refinement...
> 
> -----Original Message-----
> From: Dominique Devienne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 4:55 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> <copy> is already that smart, and syncing is a bit more 
> complex ;-) --DD
> 
> -----Original Message-----
> From: Ciramella, Edward [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 16, 2003 3:53 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> Could you use the <uptodate> task?  Then if the property has 
> been set, do
> the copy?
> 
> -----Original Message-----
> From: Dominique Devienne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 4:37 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> Here's my take on the subject:
> 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12632 

Let me know if it suits you, and post any enhancements you make to the same
place you found it. --DD

-----Original Message-----
From: Armbrust, Daniel C. [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 3:33 PM
To: '[EMAIL PROTECTED]'
Subject: Synchronize task

I am looking for a synchronize task for ant (for synchronizing files/and or
directories without requiring using copy, since that copies possibly
unneeded files).

I see someone has looked for one before, but didn't find one, in the mailing
list history.  Has anyone written one since?

If I go off to write it myself, does anyone have any code they could share
that may get me started?

These seems like it should be a pretty basic operation that has already been
implemented over and over again elsewhere...

Thanks, 

Dan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to