Julian Foad <julianfoad@btopenworld.com> writes:
> >>Shouldn't it notice that the file size and date are not as expected
> >>and return a "modified" status immediately?
> > Do we record the unmodified working file size for translated files in
> > .svn/entries? If so, then we could detect modified-ness this way.
>
> We don't currently store any size information there. However, I'm now
> thinking it's not so easy. (It would have been done if it were.)
> Even if you modify the file by changing some keyword value or EOL
> style, as long as it translates back to the same pristine text we must
> report it as unchanged. Therefore the size doesn't tell us anything.
Not so fast...
A size check can tell you if something is definitely modified. It's
only if the size comes back the same as what you recorded before that
you have to do further investigation. The algorithm is:
if (timestamp is same)
return not_modified;
else if (size differs)
return modified;
else
go_into_expensive_further_investigation();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 17 05:33:46 2006