On Wed, 21 Mar 2007, Vincent Lefevre wrote:
> I'm not asking to choose between performance and support for some
> (non always broken) tools. Using ctime (possibly in addition to
> mtime[*]) should be fine.
>
> [*] that would take a few additonal processor cycles per file, so that
> the user won't see the speed difference.
If the underlying file system has file IDs (such as inode numbers on
unix-like systems), then you can also check whether the file ID has
changed. On unix-like systems, a single stat() call will give you
ctime, mtime, size, inode number, and several other fields. I'd check
them in this order: mtime, size, inode (if available), ctime (only if
inode is not available). I see no point in checking the ctime if inode
numbers are available, because the action of replacing a file with
another file (such as via the "mv" command on unix-like systems) will
always change the inode number, but will not necessarily change the
ctime.
--apb (Alan Barrett)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 21 20:30:29 2007