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

Preserve commit times (issue #1256)

From: Matthew Sanderson <matthew_at_formtrap.com>
Date: 2006-03-08 06:05:28 CET


I would like to be able to commit/import a file F1 to the repository, then
check that file out or update it, yielding a file F2 in another working
copy, and have F2's time of last modification be the same as F1. Ie, the
checkin+checkout procedure should preserve the file's mtime. The
'use-commit-times' config option doesn't do what I want.

This is issue #1256, which has been around since SVN 1.0 or earlier.
There's a stale, incomplete patch that attempts to add this functionality:

At the moment, the only way I can see to accomplish this is to:
1. stat the file to be checked in;
2. set the value of a property on that file equal to the file's mtime;
3. checkin/import the file into the repo;
4. check out/update/export the file into another WC;
5. read the value of the file's custom property;
6. call utime[s] on the just-checked-out file.

Is this the only way to do this? It's a little ugly.
Are there any future plans to support this in Subversion itself?

The reason I want this is because I have source and generated files in a
repo, and a bogus Make rule which claims to be able to generate the
generated files from the source files, but which actually exits with an
error instead of doing the generation, because the generation can only be
done manually by a human on a different operating system. So this is a
check for a human omission. I imagine there exist less corner-ish cases in
which this functionality would be useful, too.



Matthew Sanderson
Senior Programmer (UNIX)
TCG Information Systems Pty Ltd
Sydney, Australia
+61 (02) 8303 2407

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 8 06:06:18 2006

This is an archived mail posted to the Subversion Users mailing list.