You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by George Reeke <re...@mail.rockefeller.edu> on 2008/03/10 16:13:13 UTC

File time stamps on initial import

Hello,

I am new to svn, so I'd appreciate a pointer to the answer if this
is a well known problem.  I just installed subversion 1.4.6 on my
RedHat EL 4 system.  I read the book.  I made a repository with
svnadmin create.  I imported my existing project into it with
svn import (using the svn server and the FSFS store).  I did the
initial checkout with svn checkout.

To my horror, the time stamps on all my files were updated to the
time when I did the import.  I realize it's not really important
any more what those time stamps were, except this project has
been going on for many years and I would like to be able to see
when I last worked on a particular file.

So:  Right now, while it's not too late to delete the whole repository
and start over with another copy of my project, can someone tell me
how to import a project into a repository and keep the original time
stamps?  When I make changes and commit them, then of course the
time stamps should be updated accordingly.

Thanks,
George Reeke



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: File time stamps on initial import

Posted by "Thompson, Graeme (GE Infra, Aviation)" <Gr...@ge.com>.
Unfortunately, Subversion does not yet support the storage of
timestamps....

It is a well documented bug / feature request:
http://subversion.tigris.org/issues/show_bug.cgi?id=1256

There are a couple of work arounds (That I think are referenced from the
bug entry) of which the most popular is to wrap the commits with scripts
to store the last modified timestamp as a versioned property, however I
do not believe that anyone has ever posted their commit and update
scripts to this mailing list, perhaps someone would be able to?

HTH,

Graeme

-----Original Message-----
From: George Reeke [mailto:reeke@mail.rockefeller.edu] 
Sent: 10 March 2008 16:13
To: users@subversion.tigris.org
Subject: File time stamps on initial import

Hello,

I am new to svn, so I'd appreciate a pointer to the answer if this is a
well known problem.  I just installed subversion 1.4.6 on my RedHat EL 4
system.  I read the book.  I made a repository with svnadmin create.  I
imported my existing project into it with svn import (using the svn
server and the FSFS store).  I did the initial checkout with svn
checkout.

To my horror, the time stamps on all my files were updated to the time
when I did the import.  I realize it's not really important any more
what those time stamps were, except this project has been going on for
many years and I would like to be able to see when I last worked on a
particular file.

So:  Right now, while it's not too late to delete the whole repository
and start over with another copy of my project, can someone tell me how
to import a project into a repository and keep the original time stamps?
When I make changes and commit them, then of course the time stamps
should be updated accordingly.

Thanks,
George Reeke



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: File time stamps on initial import

Posted by Paul Koning <Pa...@dell.com>.
>>>>> "George" == George Reeke <re...@mail.rockefeller.edu> writes:

 George> Hello, I am new to svn, so I'd appreciate a pointer to the
 George> answer if this is a well known problem.  I just installed
 George> subversion 1.4.6 on my RedHat EL 4 system.  I read the book.
 George> I made a repository with svnadmin create.  I imported my
 George> existing project into it with svn import (using the svn
 George> server and the FSFS store).  I did the initial checkout with
 George> svn checkout.

 George> To my horror, the time stamps on all my files were updated to
 George> the time when I did the import.  I realize it's not really
 George> important any more what those time stamps were, except this
 George> project has been going on for many years and I would like to
 George> be able to see when I last worked on a particular file.

Subversion doesn't preserve timestamps.

	   paul



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: File time stamps on initial import

Posted by Lorenz <lo...@yahoo.com>.
George Reeke wrote:
>[...]
>To my horror, the time stamps on all my files were updated to the
>time when I did the import.  I realize it's not really important
>any more what those time stamps were, except this project has
>been going on for many years and I would like to be able to see
>when I last worked on a particular file.

so if I get you right, your only interested to to preserve the
pre-subversion timestamps?

In that case I would "ls * > tempfile" and "svn propset
LastModifiedTimestamp --revprop -r ImportRev --file tempfile repoURL"

You could also, as Graeme mentioned already, use a versioned property.
In that case a would add an empty directory to the repository first,
check it out over your import folder, 'svn add' all files, set the
custom property on all files and finally commit.

If you are only interested to preserve the original timestamps of the
imported files and not plan to update the properties on each commit, I
would then remove the properties again and commit again. Otherwise you
are stuck with the original value for ever. Might be irritating 8-)
-- 

Lorenz


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org