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

Re: "svn diff" and "svn log" timestamp weirdness

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-09-01 12:21:00 CEST

Ph. Marek wrote:
> On Thursday 01 September 2005 11:36, Julian Foad wrote:
>>Ph. Marek wrote:
>>>Why not take the nearest? Ie.
>>That's absolutely horrible. Imagine the last two changes were in
>>2005-01-01 and 2005-06-06. Then if I asked for 2005-05-05 it would give me
>>the 2005-06-06 version, wrong by over a month.
> And the other is wrong by 4 months. Which should we take?

Ah, you evidently have a different idea of what the command means. The present
meaning of "-r{2005-05-05}" is "the repository state that existed at the
beginning of 2005-05-05". Thus, the state that came into existence four months
earlier is definitely the correct one.

It is only when we are comparing two times within the resolution interval to
which one of them was specified (typically one second) that we might want to
behave a bit differently.

>>Having a warning just for the exact midway point is equally horrible: the
>>choice being made does not suddenly become "unsafe" at the exact midpoint,
>>it smoothly becomes less safe the further you are from either end.
> You're right in that's not suddenly unsafe.
> But it's only in the exact _middle_ where we _cannot_ make anything other than
> a guess.

No, that's false. Wherever you are in the interval, saying that "the nearest
time is the one the user wants" is still only a guess.

> So you say there should be a threshold - 1 day? 1 month? 1 minute? Perhaps 10%
> of the difference between the two revisions, like this?

I didn't say that. That is one possible set of approaches, but I think we can
find a solution that doesn't require any warning message at all.

> I see no problem in choosing the most likely.

The "most likely" is not necessarily the nearest.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 1 12:21:44 2005

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