[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: Jon Bauman <jon.bauman_at_isilon.com>
Date: Wed, 3 Nov 2010 15:44:57 -0700

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-04 14:51:28 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.