[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: two file time questions

From: Dirk Schenkewitz <schenkewitz_at_docomolab-euro.com>
Date: 2005-05-27 14:43:11 CEST

Ben Collins-Sussman wrote:
> On May 25, 2005, at 11:41 AM, chris lueders wrote:
>> i guess svn uses the file time to speed up it's diff process. fine.
>> but why doesn't it use the file size as well?
> It does use the filesize, but only later on.
> The algorithm is:
> if (timestamp hasn't changed)
> return NO_CHANGE;
> else if (filesize has changed)
> return CHANGED;
> else
> compare byte-by-byte.

Yeah, we had a little discussion about this not long ago.
Some people including me think the algorithm should rather be:

   if (timestamp has changed)
      return CHANGED; // because at least the timestamp changed
   else if (filesize has changed)
      return CHANGED; // obviously...
   else // timestamp and filesize are unchanged, now make sure:
      compare byte-by-byte.

Or, if you don't care about a change of the timestamp being
recorded in the repository:

   if (filesize has changed)
      return CHANGED;
      compare byte-by-byte.

>> furthermore, i'd like to have a way of forcing a full check,
>> regardless of file time, if any of my files changed.
> I like that idea, sounds like a nice enhancement to 'svn status'.

Well, if the algorithm was like I described above, I believe that
a way to force a byte-by-compare wouldn't be necessary, but maybe
I miss something.

Then again, if the algorithm would stay as it is and we could have
a property, say "always_force_byte_by_byte_compare" or
"ignore_timestamp_when_comparing", that could also solve the problem.

Best regards

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:45:55 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.