Reputation: 27936
My boss asked me to setup a Subversion server for him to use so that he can share all his documents across different machines in sync and still be able to access them when there is no Internet connection.
I have this up for him, but now he's requesting that the 'create date' file attribute be preserved. I explained that since he downloaded all the files that is their create date, but he insists I find a manner to preserve this as it is affecting the desktop search agent he uses. Is there any way to set this attribute to be preserved via Subversion, or do I have to write a script to get the date of each file and have him run 'touch' after each intial check out?
Note that the set of documents that were added to the SVN repository span back several years, and he wants these dates preserved across all checkouts. So the date of the last change that Subversion has could potentially be off by years from what he wants.
Upvotes: 7
Views: 9287
Reputation: 6726
The last time I checked there was no way in Subversion to preserve the original file's timestamp.
Upvotes: 0
Reputation: 8712
Check out the property "svn:date":
svn propset svn:date --revprop -r HEAD "2007-04-22"
Which requires a hook pre-revprop-change to be set up in advance.
Upvotes: 2
Reputation: 37192
Sorry - misunderstood the question first time.
One option might be to use the svnadmin dump and load commands.
I'm not certain this is possible, but off the top of my head I think it would be. I seem to remember a script which did something like this when I transferred from SourceSafe to Subversion - I'll see if I can find it.
EDIT : Yeah, you might be able to crib some code from here (http://www.pumacode.org/projects/vss2svn)
Upvotes: 3
Reputation: 62109
You could use a Subversion file property to store the modification date, but you'd have to write your own script to update the property when checking in and to set the modification date when checking out.
Upvotes: 1
Reputation: 37192
Using TortoiseSVN
I think that will work for you.
Upvotes: 5