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

Re: Bug with revisions?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-07-15 20:48:37 CEST

On Thu, 2004-07-15 at 13:41, Bryan Donlan wrote:

> Wouldn't it be better to check the filesize first? On *nix at least
> both size and time could be checked with one function call, and if
> timestamp resolution (like in FAT) stops the timestamp from changing
> there's at least a chance it'd be detected.

When scanning a large tree, 99% of files aren't changed, so it's much
faster to do the timestamp check first... it allows us to move on to the
next file ASAP. If we checked filesize first, it would almost always
be inconclusive ("filesize is the same"), and force us to check the
timestamp anyway.

(And yes, I believe the timestamp/filesize are being grabbed from the
working file in a single stat() already. We compare the timestamp to
the one recorded in the .svn/entries file (which is cached in memory).
If a filesize check is necessary, we compare the filesize to that of the
.svn/text-base/ copy, which requires another stat().)

The basic rule-of-trust here is: we assume the user isn't mucking
around and creating false timestamps. Don't Do That.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 15 20:50:45 2004

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.