ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: New attribute for DifferentSelector
Date Fri, 02 Jul 2004 11:50:07 GMT
Antoine Levy-Lambert wrote:
> The depend selector is asymetric between source and target.
> The different selector is not.
> For instance :
> - the different selector returns true if the source exist and the target 
> does not, but also
> if the source does not exist and the target does
> - the different selector, if it compares timestamps, returns true when 
> timestamps differ,
> regardless of whether the source file is more recent than the target or 
> the contrary.
> On top of that the different selector can compare filesizes, which the 
> depend selector does not do,
> but is not a time expensive operation.
> What I want to achieve with this ignorecontents attribute on different 
> is the ability to select quickly
> files which need to be synched, without comparing contents.

<different> was meant to be a replacement for <depends> where the source 
file got regenerated from somewhere -the classic is some WSDL file 
describing a web use different for byte-for-byte 
comparison to see if it really has changed. The other things (existence, 
size) are there as shortcuts to having to do the full compare.

Now if you know that sizeof(filea)==sizeof(fileb) ==> 
equals(filea,fileb), then you have a rationale for bypassing the check. 
Especially if this is some remote filesync you are planning.


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

View raw message