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

Re: Status of meta-data-versioning (mod time)?

From: Dirk Schenkewitz <schenkewitz_at_docomolab-euro.com>
Date: 2005-07-12 20:39:05 CEST

Oliver Betz wrote:
> Dirk Schenkewitz wrote:
> ...
>>- People, including me, want to know "when was the last change to
>> that file?", even if the file was laying around for some time
>> (months/years!) before being put under subversion control. This
>> problem cannot be solved using --use-commit-times.
>
>
> It can if you make one commit per file on initial import. Slow and
> ugly, but it works tolerably.

No, it does not work at all. "use-commit-times = yes" sets the mtime
of a checked out file to the time of the commit, the original mtime
is lost when the next one does a checkout that creates this file.
I just tested, with "use-commit-times = yes":
---------------------------------------------
nobody:/B/test1/trunk> cp -av /usr/src/daemontools-0.76/src/CHANGES .
nobody:/B/test1/trunk> svn add CHANGES
A CHANGES
nobody:/B/test1/trunk> svn ci
Adding trunk/CHANGES
Transmitting file data .
Committed revision 7.
nobody:/B/test1/trunk> svn up
At revision 7.
nobody:/B/test1/trunk> ll -tr
...
-rw-r--r-- 1 nobody nobody 3361 2001-07-12 18:49 CHANGES
-rw-r--r-- 1 nobody nobody 0 2005-05-20 15:52 1
-rw-r--r-- 1 nobody nobody 0 2005-06-02 17:40 2
...
# Note that the date is still "2001-07-12",
# 'svn up' did not change that.
nobody:/B/test1/trunk> cd ../..
nobody:/B> svn co svn://server/_test_ test2
...
Checked out revision 7.
nobody:/B> cd test2/trunk/
nobody:/B/test2/trunk> ll -tr
...
-rw-r--r-- 1 nobody nobody 0 2005-05-20 15:52 1
-rw-r--r-- 1 nobody nobody 0 2005-06-02 17:40 2
-rw-r--r-- 1 nobody nobody 3361 2005-07-12 19:14 CHANGES
...
# Now "CHANGES" is not the oldest file, it is the youngest,
# the mtime is "2005-07-12", just by chance this is exactly
# 4 years later :)
---------------------------------------------

If you do commits for each single file at a time, you can keep the
*order* of the original mtimes, that's all.

>>Since Oliver's problem is the nonexistence of a windows build of
>>subversion with the meta-data patches, there might be a solution:
>
>
> not only. If Phil Marek's solution remains a patch, it will always
> be some effort to make it working in a new version. I would use the
> solution only if it is in the main version.

Oh. I thought I had a good idea.

> If not, and if I needed the timestamp, I likely would use another
> method, e.g. hook scripts saving the mtime in a file property. But
> at the moment, I can live with my "adjust commit time" hack.

If I may I ask: How do you do that? Maybe it is your hack that would
solve my problem of (not wanting to but anyway) loosing the original
mtime.

"use-commit-times = yes" on its own just turned out to be less
useful than I thought.

Best regards
   Dirk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 12 20:40:53 2005

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