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

Re: retroactive mtime versioning

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-03-26 00:30:50 CEST

On Mar 25, 2007, at 13:21, Aryeh Leib Taurog wrote:

> Then I heard from the client. They *must* have the original mtimes
> (for files I don't modify, obviously).
>
> Short of starting a new repository and re-importing with Oliver
> Betz's script, or compiling the branch of svn that maintains
> mtime, is there any way to *reset* the mtime of the files already
> in the repository to match the times my client wants? (i.e. the
> original times)

You cannot reset mtimes because Subversion never stores the mtimes.
You can change any revision's commit time (svn propset --revprop -r
123 svn:date <NEWDATE>) but that time then applies to all files
included in that revision.

If you want to store modification times of each file, I see two
options. One, you can commit each file as a separate revision, then
set the svn:date property of the just-committed revision to match
what the mtime of the file was. Repeat for all files.

Or two, you can attach a new property (e.g. x-mtime) to each time.
Set that property to the actual modification time of the file.
Perhaps invent a script which handles the commit, by attaching the
property and then calling svn ci. Invent another script to replace
svn checkout, which checks out, and then also sets the actual mtimes
of the files as per the contents of the new property.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 26 00:31:10 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.