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

Re: svn does not detect file recodings as changes

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: 2007-02-19 23:32:40 CET

Phillip Susi wrote:

>> Comparing the ctime would be more appropriate to determine if a file
>> has been meddled with since the last update, wouldn't it?
>
> No, it would not. The ctime is updated when the inode is modified, not
> when the file's contents are changed. That means whenever you change
> owner or permissions. The only reason ctime entered this discussion is
> because it gets updated when you manually change the mtime ( to put it
> back to where it was before you did modify the file ).

It is also updated in the more typical situation where mtime is updated
for the normal reason of having modified the file, so there is no down
side to using it to check for modifications.

> The entire point
> of not updating the mtime is to make it appear as though the file has
> not been changed, for instance, when you restore the file from a backup.

If you've restored from a backup you'd probably want svn to take the
extra fraction of a second to make sure things are actually correct.

> Trying to second guess a manually overridden mtime by looking at the
> ctime is not appropriate because it discards the user's wishes that they
> expressed by modifying the mtime.

You aren't trying to second guess the user since mtime wasn't manually
set directly by the user, and since ignoring modified files that happen
to have the same timestamp as before the modification isn't a documented
behavior of svn, it can't be what the user wants to happen. You are
second guessing the actions of another program second guessing the user.

> This is an error in the recode utility, not svn. Recode clearly
> modifies the file, so it should not be trying to hide that fact by
> reversing the mtime.

Until/unless svn documents the conditions under which modifications to
files under revision control are supposed to be ignored, it is a bug in svn.

> If recode doesn't have a way to disable this behavior, then an easy
> workaround would be to touch the file when you recode.

Yes, that should work.

-- 
   Les Mikesell
    lesmikesell@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 19 23:34:12 2007

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.