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

Re: maintaining file modified dates during svn import?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-09-20 23:15:01 CEST

On Sep 20, 2007, at 14:37, Reuben Avery wrote:

> i need to be able to maintain the modified dates on files during an
> svn import. anyone know how to go about this? currently, the file
> date always gets set to the current date during an import. this is
> problematic for me as i am trying to mirror a client’s website into
> the subversion repository but need to maintain those dates for
> reporting and site mirroring purposes.

Subversion does not offer this feature. A Subversion repository does
not store individual modification dates on a file and directory
basis. Rather, each commit has a date/timestamp.

To achieve what you want, you would have to employ a workaround, such
as:

* Import each file separately, in its own revision, in modification
date/time order. After importing each file, set the svn:date property
of that revision to the modification date/time of the file.
* On each client, you'd need to use the "use-commit-times" option so
that when you check out, the file's modification time gets set to the
time it was committed, instead of the current time as is the default.

Yes, this is a bit inconvenient. I believe someone may have written a
script to automate the laborious importing process if you're
interested, but I'm not sure where it is. Maybe someone else remembers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 20 23:17:22 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.