'SVN Info - My last changed date is before my text last updated date

This is part of my output when I run svn info on a file:

Last Changed Author: [user]
Last Changed Rev: 269612
Last Changed Date: 2014-02-11 12:35:30 -0500 (Tue, 11 Feb 2014)
Text Last Updated: 2014-02-17 15:20:29 -0500 (Mon, 17 Feb 2014)

The text last updated is after the last changed rev/date! How can Subversion be aware of a change to the text of a file if there wasn't a change submitted? This doesn't make a lick of sense to me.

I thought maybe it meant the last change on my local version, but I ran this on the 18th, right after editing the file myself. So that doesn't seem to be it.

(I'm trying to figure out which revision committed a mistake in merging.)

svn


Solution 1:[1]

Text Last Updated is the timestamp that Subversion uses to see if the file has been modified from the base revision of the file (otherwise known as the pristine version). Subversion tries to avoid needing to read the whole file to detect changes by storing the timestamp and size of the file when a pristine version is installed in your working copy.

This date is almost always going to be newer than the LastChangedDate (with the exception of something setting the svn:date revision property to a date different than the actual commit time).

You can see this date change by running update on a file between two revisions.

For example:

$ svn info CHANGES | grep 'Text Last Updated:'
Text Last Updated: 2014-02-17 10:25:09 -0800 (Mon, 17 Feb 2014)
$ svn-trunk log --limit 2 CHANGES
------------------------------------------------------------------------
r1569069 | breser | 2014-02-17 10:25:49 -0800 (Mon, 17 Feb 2014) | 2 lines

* CHANGES: Update for 1.7.16 and mark 1.7.15 as not released.

------------------------------------------------------------------------
r1568070 | breser | 2014-02-13 14:28:41 -0800 (Thu, 13 Feb 2014) | 2 lines

* CHANGES: Update for 1.8.8, 1.8.7 will also not be released.

------------------------------------------------------------------------
$ svn up -r 1568070 CHANGES
Updating 'CHANGES':
U    CHANGES
Updated to revision 1568070.
$ svn info CHANGES | grep 'Text Last Updated:'
Text Last Updated: 2014-02-18 15:20:44 -0800 (Tue, 18 Feb 2014)
$ svn up CHANGES
Updating 'CHANGES':
U    CHANGES
Updated to revision 1569555.
$ svn info CHANGES | grep 'Text Last Updated:'
Text Last Updated: 2014-02-18 15:20:58 -0800 (Tue, 18 Feb 2014)

The field will also disappear if you update while the file is locally modified:

$ echo foo >> CHANGES
$ svn up -r 1568070 CHANGES
Updating 'CHANGES':
G    CHANGES
Updated to revision 1568070.
$ svn info CHANGES | grep 'Text Last Updated:'

This is because there is no time we can use to short circuit comparing the file since the installed version of the file is known to be modified.

Revert the file and it'll show back up:

$ svn-trunk revert CHANGES
Reverted 'CHANGES'
$ svn info CHANGES | grep 'Text Last Updated:'
Text Last Updated: 2014-02-18 15:46:47 -0800 (Tue, 18 Feb 2014)

Solution 2:[2]

"Text Last Updated" [sic] is the time your local copy (er "working copy") of the file was last updated. A better name would be "Local File Last Updated"

For example:

  • If there were new changes to the file in SVN and you ran "svn update" to update the local copy of your file (er "working copy"), the "Text Last Updated" [sic] would be the time of the "svn update"
  • If you accidentally deleted your local copy, then ran svn update to get a new local copy, the "Text Last Updated" [sic] time would be the time the svn update ran.

Solution 3:[3]

You can see (and change) revision properties, does you know it?

Last Changed Date is svn:date, svn ps can change it

>svn info G1.txt
...
Last Changed Rev: 5
Last Changed Date: 2014-02-07 12:06:56 +0600 (??, 07 ??? 2014)
Text Last Updated: 2014-02-07 11:44:04 +0600 (??, 07 ??? 2014)

and

>svn pl -r 5 --revprop -v
Unversioned properties on revision 5:
...
  svn:date
    2014-02-07T06:06:56.711384Z

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Ben Slade
Solution 3 Lazy Badger