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

svn revert causes file modification times to go backward

From: Paul Maier <svn-user_at_web.de>
Date: Sun, 7 Nov 2010 10:13:31 +0100

Hello Jon,
 
concerning the modify time: it's fine for me when the time goes backwards
on a revert. With a revert, I want everything reverted.
 
But I understand your issue with the compiler.
For this, in TortoiseSVN there is an option (in the General section).
Maybe it would be good to have such an option in SVN, too.
 
Paul.
 

  _____

Von: Jon Bauman [mailto:jon.bauman_at_isilon.com]
Gesendet: Mittwoch, 3. November 2010 23:45
An: users_at_subversion.apache.org
Betreff: svn revert causes file modification times to go backward

I noticed that after an SVN revert, the files I reverted didn't seem to be getting rebuilt. To my surprise, the modify time
following the revert went backwards rather than forwards. Even more confusing, the change time went forward as expected. Following a
"touch", everything is copacetic and make successfully rebuilds the file.

$ stat foo.c
  File: `foo.c'
  Size: 107262 Blocks: 224 IO Block: 4096 regular file
Device: 811h/2065d Inode: 3563541 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2354/ jbauman) Gid: ( 1000/ jbauman)
Access: 2010-11-03 15:21:56.000000000 -0700
Modify: 2010-11-03 15:21:38.000000000 -0700
Change: 2010-11-03 15:21:38.000000000 -0700
$ svn revert foo.c; stat foo.c; touch foo.c; stat foo.c
Reverted 'foo.c'
  File: `foo.c'
  Size: 107255 Blocks: 224 IO Block: 4096 regular file
Device: 811h/2065d Inode: 3563542 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2354/ jbauman) Gid: ( 1000/ jbauman)
Access: 2010-11-03 15:22:40.000000000 -0700
Modify: 2010-11-02 14:53:49.000000000 -0700
Change: 2010-11-03 15:22:40.000000000 -0700
  File: `foo.c'
  Size: 107255 Blocks: 224 IO Block: 4096 regular file
Device: 811h/2065d Inode: 3563542 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2354/ jbauman) Gid: ( 1000/ jbauman)
Access: 2010-11-03 15:22:41.000000000 -0700
Modify: 2010-11-03 15:22:41.000000000 -0700
Change: 2010-11-03 15:22:41.000000000 -0700

$ svn --version
svn, version 1.5.5 (r34862)
   compiled Jan 8 2009, 05:34:48
Received on 2010-11-07 10:19:16 CET

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.