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

Re: retain original date on binary files?

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-15 00:35:59 CEST

On Jun 14, 2006, at 19:27, Sherman, Dennis (END-CHI) wrote:

> I'm evaluating Subversion for a new project, first time we'd be
> bringing it
> into our shop.
>
> What I'd like to do is put 3rd party jar files under Subversion's
> control,
> so we can manage all of our dependencies from one place. But I
> would like
> to retain the original datestamp on the jar file, as not all jar
> files are
> named with an indication of their version, and the file's date is
> often a
> good indicator of the version.
>
> This doesn't seem to be possible -- from reading the online books and
> searching the mailing list archives, it looks like when a file is
> checked
> out from Subversion, the date it gets is the date of the last time
> the file
> was touched in the repository. (Unless the server is configured with
> use-commit-times.)
>
> Can anyone confirm that what I'm looking for, retaining a file's
> original
> datestamp at the time of first commit, can't be done via simple
> configuration?
>
> And assuming that's true, is there an approach that will let this
> be done
> using hook scripts around svn commands?

When you commit (or import), Subversion stores the current date and
time in the revision. If you're importing a tree of files with
varying dates and times, and expect that to be preserved, you'll be
disappointed. :-)

There is a branch of Subversion which includes the saving of the date
and time. If this is necessary for you, you could use that branch
instead -- if it still works (I don't know).

http://svn.collab.net/viewvc/svn/branches/meta-data-versioning/

Or, if you'd rather work with standard Subversion, you could commit
each JAR file in a separate revision, in chronological order would be
best, and then change each revision's svn:date property to the
modification date of the file. That would be tedious, but it would
work, and perhaps someone has already written a script to import a
directory that way. (I think I saw something like that months ago on
this list, but I could be imagining it.)

When you check files out of a repository, the default behavior is
that the files get the current timestamp. If you want to see instead
the timestamp of when the files were committed, then you uncomment
the line "use-commit-times = yes" in the file ~/.subversion/config.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 15 00:37:28 2006

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.