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

Re: svn commit: r943445 - in /subversion/trunk/subversion: svn/cl.h svn/log-cmd.c svn/main.c tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 12 May 2010 14:00:49 +0200

On Wed, May 12, 2010 at 07:48:58AM -0400, Mark Phippard wrote:
> On Wed, May 12, 2010 at 7:24 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> > On Wed, May 12, 2010 at 10:59:28AM -0000, stsp_at_apache.org wrote:
> >> Author: stsp
> >> Date: Wed May 12 10:59:27 2010
> >> New Revision: 943445
> >>
> >> URL: http://svn.apache.org/viewvc?rev=943445&view=rev
> >> Log:
> >> Add a new --show-diff option to svn log, fixing part of issue #2909.
> >
> >> +      SVN_ERR(svn_client_diff5(diff_options,
> >> +                               lb->target_url,
> >> +                               &start_revision,
> >> +                               lb->target_url,
> >> +                               &end_revision,
> >> +                               NULL,
> >> +                               svn_depth_infinity,
> >> +                               FALSE, /* ignore ancestry */
> >> +                               TRUE, /* no diff deleted */
> >> +                               FALSE, /* show copies as adds */
> >> +                               FALSE, /* ignore content type */
> >
> > BTW, I deliberately hard-coded the above options in the initial
> > implementation. We could decide to leave it like this, given
> > that svn log is not the primary tool to produce variants of diffs.
> > I set these options with the goal of getting the shortest possible
> > diff shown, with the exception of ignore_ancestry.
>
> I don't want to pee in the punch bowl, but why are we doing this?

Because it has proven to be a popular feature in other systems.
It's very convenient if you want to catch up with the latest N
commits made and skim the diffs. Especially if there aren't any
commit list archives (many, many shops do not have those).
And I have missed it in svn sometimes, too.
Also, Daniel N. and Bert have said they will use it.

> Especially if we cannot implement it sufficiently?

What do mean by sufficiently? We can certainly implement it
sufficiently. You ask svn log to show diffs and it shows them.
What's not sufficient about that?

If you mean efficient, Bert pointed out that it probably won't be
possible at all to implement it without opening a second RA session.
I guess we could have the server send a diff to the previous revision
along with every log item. But that would require a lot more changes.

How fast it is depends on the connection to the server, as with so
many things in svn. I suggest you try it out and see for yourself.

svn log --diff -l 10 http://svn.apache.org/repos/asf/subversion

And it's completely optional. The extra overhead isn't there if you
don't use the option.

> In terms of the implementation, how are you handling the log output in
> XML when the user asks for diffs?

We error out with an informative error message:

$ svn log --diff --xml
svn: Try 'svn help' for more info
svn: 'show-diff' option is not supported in XML mode
$

Stefan
Received on 2010-05-12 14:01:34 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.