ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@mad.scientist.com>
Subject Re: Remarks: file copy, subprojects, ant install
Date Tue, 19 Sep 2000 08:10:04 GMT
At 07:54  18/9/00 +0200, you wrote:
>>We are in the course of reworking the file handling tasks so this is
>>the right time to speak up. Currently we have overwrite if source is
>>newer (the default) and always overwrite (if forceoverwrite has been
>>set). Have you thought about how to state the additional options
>>(speaking of attributes)?
>
>Hm... I've thought, but not thoroughly. Just some ideas:
>
>Src=...   dest=... 
>backup="Yes|No" ifExist="ignore|newer|force|alternate"

One point here is that XML style is always to use lower case and seperate
word boundaries with - however as ant doesn't handle - AFAIK it is usually
elided and a run created 
ie backup="yes|no" ifexist="ignore|newer|force|alternate"

>Backup = "true" => make backup copy if a copy is done. Ant selects 
>the name for the backup file on a per-platform basis (.BAK, .OLD ...)

No - it should always be one extention - I don't want to go through hell
just because some people compile on one platform and others on another :P.
Probably best to use one of the default exclude backups (ie append ~)

>ifExist = "ignore"    => never copy file if it already exists.
>        = "newer"     => copy file if src newer than destination
>        = "force"     => copy file unconditionally

I like the above

>        = "alternate" => copy src file to alternate destination, i. e. 
>        	         'dest.dist' if destination exists. Possibly
>        	         backup if 'dest.dist' also exists.

I dislike this and don't really see the need in a "copy" task

>One aspect to bear in mind is that there propably will  be a need for
>more policies over time. Possible examples would be multiple backups
>("dest.BAK.1, dest.BAK.2, dest.BAK.3") and/or my real favourite: a
>diff3 type of merge of the config file changes both from site and
>vendor. This is not for now, unfortunately. This could be handled by
>backup="rolling" or ifExist="merge" in this type of attribute scheme.

ack WARNING flexability syndrome :P. It is unlikely to be needed in a copy
task so we can put it in another if it is desperately needed


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message