ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harkness, David" <DHarkn...@sonypictures.com>
Subject RE: Ant Copy
Date Fri, 15 Aug 2003 18:43:34 GMT
Hi Vikas,

Sorry, I didn't intend the sarcasm to be on such a high level, I was
just foolin' around. Anyway, someone else mentioned a <sync> task and
using <delete> with <not> and <present>. I suppose that would result in
comparing the two trees, but I haven't tried it.

Me cupla,

David Harkness
Sony Pictures Digital Networks
(310) 482-4756


-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
Sent: Friday, August 15, 2003 9:01 AM
To: 'Ant Users List'
Subject: RE: Ant Copy


Ok David,
I had read abt and worked with Ant copy task before I posted this
message. I understand its functions, but I have unique situation at hand
so I was looking for some means to achieve that, copy task or no copy
task.

I know I could first delete all the files in the destination and then
copy to it so that the destination doesn't have the unwanted files
anymore. But that's not an option. 



-----Original Message-----
From: Harkness, David [mailto:DHarkness@sonypictures.com] 
Sent: Thursday, August 14, 2003 5:44 PM
To: Ant Users List
Subject: RE: Ant Copy

Okay, I'll take a stab at it.

First, <copy> is not a synchronization task -- it only copies files and
directories. Thus, you cannot do what you're trying to do (make one
directory look like another). To be clear, it will *not* result in
deleting a file *ever*. Perhaps you want to delete the directory
entirely from project1 and then copy it from project2 to project1?

Second, I do believe that <copy> checks the modification times of times
and copies only newer files, but I'm not sure. Have you checked the
docs? Let's see ... 

``Copies a file or FileSet to a new file or directory. By default, files
are only copied if the source file is newer than the destination file,
or when the destination file does not exist. However, you can explicitly
overwrite files with the overwrite attribute.''

Look at that: second sentence of the first paragraph of <copy>'s
documentation. I know, you were too busy to read the documentation, eh?
;)

David Harkness
Sony Pictures Digital Networks
(310) 482-4756


-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com] 
Sent: Thursday, August 14, 2003 5:04 PM
To: 'Ant Users List'
Subject: Ant Copy


Sorry guys I'm posting this issue again but I really need some ideas on
it. Please help.


I had files A,B,C in Project1 and were copies to Project2. In Project2 I
deleted the file C but added a new file D. Now when I copy back, Ant
would copy the new file D to Project1 and other files that were modified
but I need the file C that was deleted in Project2 to be deleted in
Project1 also after the  copying back task in completed.

Project1 should be exactly the same as Project2 after the reverse
copying.

I could first delete all the files in Project1 before copying the files
from Project2 and now Project1 would not have the deleted file C. But
deleting files from Project1 before copying to it is not an option.

Anybody done something similar. Do I write a new task ??

Any ideas ??


Vik




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message