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

Re: svn status: does not notice changed file if timestamp of "new" file is older

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-11-13 20:59:46 CET

solo turn <soloturn99@yahoo.com> writes:

> test.txt in t2/, the working copy:
> cre: wed, 13. 11. 2002 20:04:09
> mod: tue, 13. 11. 2002 20:15:21
> acc: wed, 13. 11. 2002 20:15:27
>
> t2/test.txt (if it is overwritten with
> the backup file):
> cre: wed, 13. 11. 2002 20:04:09
> mod: tue, 12. 11. 2002 17:27:54
> acc: wed, 13. 11. 2002 20:16:25
>
> and yes:
> in windows, the modified time is reset, when the files contents gets
> modified (which is not too bad actually). but if you copy a file over
> another file, then there is the behaviour, that the creation date is
> from the file, and the modified date is from the contents (so
> creation can be newer than modified .... weird, eh?)

Win32 APR does

    FileTimeToAprTime(&finfo->atime, &wininfo->ftLastAccessTime);
    FileTimeToAprTime(&finfo->ctime, &wininfo->ftCreationTime);
    FileTimeToAprTime(&finfo->mtime, &wininfo->ftLastWriteTime);

and Subversion's svn_io_file_affected_time() does not expect mtime to
be less than ctime.

It's possible that APR should be changed to put the more recent of
create/last write into ctime. However that's really a separate issue
and need not concern us, I don't think Subversion should be using
ctime at all, it's only interested in the file contents. I'm going to
check-in a patch to make svn_io_file_affected_time always use mtime,
that is unless someone objects :)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 13 21:00:42 2002

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

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