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

Re: Is there really no way to keep the file modification time intact?

From: Frans Knibbe <frans_at_geodan.nl>
Date: 2007-02-27 15:37:55 CET

Erik Huelsmann wrote:
> On 2/26/07, Frans Knibbe <frans@geodan.nl> wrote:
>> Hello,
>> I have seen the subject pass by a few times in this list: subversion
>> changes the file (modification) time to the commit time when you put a
>> file in the repository.
> Not exactly. It doesn't record the modification time.
Ah, thank you. I did not know that. If no file modification times are
stored I can see why resolving this issue might be complicated.
>> put them in the repository. And that includes the time of the last
>> modification.
> I want my files to come back exactly like they were when I
> Um, no. That's not 'the file', that's 'data about the file' -
> metadata. Subversion only versions directory trees, not the metadata
> which may be associated with directory trees.
I find it hard to draw a line between the file data and its metadata.
Is the file name a metadatum? Are the file permissions metadata? Is it
possible to make these distinctions regardless of the type of file system?
> Do you only need this once? (on import) Or do you need it always? (on
> every commit)
> Well, if this behaviour is so important to you, and you need the
> second option (always), then is Subversion really the tool for your
> organization?
I think we need it always. But it would be nice to have at least during
the migration. Then at least the file times would still be in the same
order, and no great gaps in time would exist, assuming there will be not
too much time between file modification and commits.

Apart from this issue, Subversion does seem the right tool for our

>> As it is now, it seems that all the files in the repository
>> will wind up with the file time set to the moment they are handled by
>> the importer. That means that a lot of useful and maybe vital
>> information will get lost.
>> Does anyone know of a way to put files in a subversion repository with
>> the file time intact?
> Only if you put the file time in a custom property which you restore
> after checking out.
Yes, I thought about that too. That way, the file modification time
would not be really lost but just stored in a different way. And if
something like a post-checkout hook existed I could even reset the file
time of the working copy. But such a hook does not exist....

I think I could also temporarily set the system time to the file
modification time before I commit each file, just during the migration
process. That way, commit time would always be equal to file
modification time. But I really hope I can avoid having to do something
a dirty as this.
> bye,
> Erik.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 27 15:39:38 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.