On May 27, 2005, at 3:03 AM, chris lueders wrote:
>
>
>> if (timestamp hasn't changed)
>> return NO_CHANGE;
>> else if (filesize has changed)
>> return CHANGED;
>> else
>> compare byte-by-byte.
>>
>
> why not use
>
> if (filesize has changed)
> return CHANGED;
> else if (timestamp hasn't changed)
> return NO_CHANGE;
> else
> compare byte-by-byte.
>
> that will not change the runtime in any significant amount and be
> safer, or am i missing a detail?
It would be slower. We record the working-file's timestamp in the
entries file, which is already loaded into memory. So to check the
timestamp, we only need to stat() the working file. To check
filesizes, we need to do a 2nd stat of the text-base file. Perhaps
this is an argument to store the size of the text-base file in .svn/
entires as well...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 27 14:44:00 2005