[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: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2007-02-26 21:56:21 CET

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. If you want, you
can have one of 2 behaviours on checkout:

1) use the time of checking out (the default) [ie when the file is
created in the target filesystem]
2) use the time of the commit (optional in the client side configuration file)

> It is not possible to override this behaviour. I
> think is a fundamental problem with subversion.

Why? The file didn't exist in the target filesystem before you checked it out...

> Whether I copy the file
> to another location, or compress it in an archive, or put it in a
> subversion repository, the time the file was last modified should not
> change. In other words: I think subversion should not tamper with files
> it stores.

It doesn't. It just doesn't record the file's metadata.

> I want my files to come back exactly like they were when I
> put them in the repository. And that includes the time of the last
> modification.

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.

> Now I have found that this problem is already an offcial issue. Its
> number is 1256
> (http://subversion.tigris.org/issues/show_bug.cgi?id=1256). But the
> issue has remained unresolved for a long time. I see it has now been
> postponed to version 1.5. I do hope this bug really gets solved soon.
>
> But I really can not wait for version 1.5. My organization is moving
> from another source control system to SVN and I have to write an
> importer.

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?

> 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.

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 26 21:57:21 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.