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

Re: [PATCH] Issue #2285

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-05-03 15:26:17 CEST

On Tue, 2 May 2005 kfogel@collab.net wrote:

> "Peter N. Lundblad" <peter@famlundblad.se> writes:
> > I'm uncomfortable with this idea. It makes invoking the log message func
> > with 0 commit items mean "don't ask the user, but give me a message if it
> > was specified by some other means" or something like that. That's not
> > documented in the API and I don't think we can introduce such a change and
> > be compatible.
> >
> > Also, to be honest, I think it is very hacky. Why not just make the
> > cmdline client check that -F or -m weren't specified when an operation was
> > invoking without an URL? I don't think libsvn_client should ask for a
> > message unless it really wants one.
>
> The problem is that the command-line client does not *know* if the
> target is a URL or not. That's not determined until we get way down
> into the libsvn_client, at which point the only way we know whether or
> not a log message was obtained is via the log message callback. I'm
> open to suggestions, but so far I've been unable to think of a less
> hacky way to do it :-(.
>
Well, I think the cmdline client knows, at least if it asks a simple
question. I mean, there is no magic in libsvn_client that makes it
difficult for the cmdline client to know if it will do a commit or just
local fiddling. The API docs state that if dst_path (or paths) is/are
URL(s), then it is a repository operation. So, why not just make cmdline
check if -F or -m was specified and then check if the target(s) are URLs.

> As for the log message function: I'm only depending on the actual
> behavior of our implementation (since I didn't change it), so although

"our implementation" is the problem here.

> technically there might be a compatibility concern here, I don't think
> it would be a problem in practice. We should document the behavior if

How do you know? (I don't think this is a theoreticla discussion.) Say I
wrote my PerfectSVN client. Its log_msg_func pops up a dialog when called,
but it doesn't special-case the zero commit items case. That's reasonable
since nothing told it to.

To be more concise: ABI also inlcudes semantics. Before log_msg_func was
invoked when we *wanted* a message; now it is also invoked when we *don't*
want a message:-)

> we're going to depend on it, though, yes.
>
Hm, "...invoke log_msg_func/baton when a log messages is needed - or not
needed":-)

OK, I'll stop being nasty. But I really think this introduces confusion
into our APIs without it being necessary.

Best,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 3 15:19:47 2005

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