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

Re: ModificationDate after commit

From: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Wed, 13 Jan 2010 15:05:09 -0600

On Jan 13, 2010, at 02:52, Claudius Sailer wrote:

> we use a software with a lot of EXE-Files where the developer company uses
> the modification date as version information. So this informations are
> important for us.
> the software we get from this company is imported into a vendor branch (for
> every patch or hotfix delivery a new vendor brnach) and when we check out
> we see the correct modification date in our file structure because we
> activated use-commit-times = yes. After imported the sent software we want
> to merge this with a branch or trunk and commit the changes. After that the
> modification date is lost.
>
> What can we do that the modification date we can see on file structur is
> also stored in svn and is also possible to see after checkout/update?

As you've discovered, Subversion does not store the modification date/time in the repository. It stores only the commit date/time. The request to have Subversion store the modification date/time was filed years ago; I wouldn't count on it getting resolved soon.

http://subversion.tigris.org/issues/show_bug.cgi?id=1256

When you check out, file modification dates are either "now" (use-commit-times in your Subversion client's config file is off) or the commit time (use-commit-times is on). If you have this feature turned on, you could manually set the svn:date property of the merge revision to the date of the original revision, but note that if this causes your revision dates not to be in chronological order, it means you cannot use Subversion's date-based revision search feature; it will happily return a result revision to you, but it might not be the correct one.

http://svnbook.red-bean.com/en/1.5/svn.tour.revs.specifiers.html#svn.tour.revs.dates

Note also that the revision date of course applies to every file committed in that revision. If it's important that different files in a single revision be shown to have different modification times, then this won't help you. You could merge each file one at a time and set that revision's svn:date to that file's desired modification time, but this gets unwieldy.

As Bob mentioned, you could instead add a custom property with this information and manage it manually.
Received on 2010-01-13 22:05:51 CET

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.