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

Re: [PATCH] Re: log/blame -g and old servers

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-10-19 20:20:18 CEST

On 10/19/07, David Glasser <glasser@davidglasser.net> wrote:
> On 10/19/07, Mark Phippard <markphip@gmail.com> wrote:
> > On 10/19/07, Hyrum K. Wright <hyrum_wright@mail.utexas.edu> wrote:
> > > David Glasser wrote:
> > > > On 10/12/07, Karl Fogel <kfogel@red-bean.com> wrote:
> > > >> "David Glasser" <glasser@davidglasser.net> writes:
> > > >>> Here's a patch implementing that for ra_svn. (Presumably, the same
> > > >>> patch for DAV will be harder because of the general lack of
> > > >>> capabilities.)
> > > >> As we were discussing in IRC: detecting capabilities will be easier
> > > >> after I commit my patch for issue #2959 (latest patch attached there
> > > >> for inspection).
> > > >
> > > > Now that we have this, do people support adding a mergeinfo capability
> > > > and using this to (among other things) error out on log/blame -g?
> > > >
> > > > I'm not sure what I feel about Mark's argument about wanting to
> > > > hardcode to the -g equivalent. Maybe the svn_client APIs could return
> > > > a boolean saying whether or not mergeinfo was actually used?
> > >
> > > My initial reaction was not to produce an error, but now I'm not so
> > > sure. If I run 'log -g' on an unknown server, I'll get different
> > > results, depending on whether that server is pre-1.5 or not. Producing
> > > different results dependent upon server version is Bad (at least in this
> > > case).
> >
> > That is like saying running this command on a range of revisions with
> > no merges gives different results. It gives the information it has.
>
> A *repository* can be 1.5-y and contain mergeinfo without a particular
> server serving it being.
>
> In fact, this may be surprising, but *a lot of the new merge tracking
> features kind of work without a 1.5 server*. Currently,
> merge_tests.py passes cleanly with a trunk client and a 1.4.x
> svnserve. Only 4 of the 74 tests have a "skip this if the server
> doesn't support mergeinfo" tag!
>
> In the status quo, there can be a repository with mergeinfo in it that
> log/blame -g make appear to the user as if there is no mergeinfo if
> the server is old. This is a problem.

Why? Just saying it is a problem doesn't make it one.

> > > I now feel that producing an error here isn't a problem. Clients can
> > > trap the error and take whatever action they feel appropriate, which may
> > > include informing the user, and reissuing the request. I suspect the
> > > command line client would just error out.
> >
> > Spoken like a command line user. So do you think we should change all
> > GUI's to always just run svn log, then make you take a second option
> > to re-run it with the merge info included? Or should we remember that
> > is what you wanted, and instead let the tool generate errors and force
> > you to turn the feature off? Or always run the command, get an error,
> > dynamically change the setting and try again? This would be a good
> > product?
>
> I don't see what is wrong with the last choice here. This is how most
> of svn's compatibility code works. If you want to pass the new
> boolean to the API in Subclipse, then just wrap it in a try/catch and
> if a not-implemented exception is thrown, try again with it as false.
> You only need to do this in one place in your code if you want. I
> don't see how this is a large burden. (As far as efficiency goes,
> Karl's capabilities implementation makes a capability request happen
> at most once per RA connection.)

So in a GUI tool it is OK to have checked an option that says you want
to see the merged revisions, but then not see them? I think the
answer is Yes by the way. But this contradicts the previous problem.
The difference is that a command line user has to type -g. A GUI user
might have set some preference somewhere. It is different. In the
case of Subclipse, we have a History view that can be open that even
automatically tracks your editor. So as you open a file the view
shows the history for that file. Getting errors here would be
unacceptable.

Why can't the command line just error out if -g is used but leave the
API itself alone? Maybe that is all you have been proposing, in which
case I'd be OK. I just want to use the API from JavaHL and not get an
error or perform extra server roundtrips. By the way, distinguishing
the reason for the error in JavaHL is not always as easy as it sounds.

> > > Using our capability mechanism would be the cleanest way to implement
> > > this, IMHO.
> >
> > Someone explain to me why our current --depth feature is acceptable
> > then? We are really assuming that people's main concern is not having
> > extra files locally as opposed to not transferring them over the wire
> > in the first place? Because I'd be using the feature for the latter.
>
> Because in fact the back-compat doesn't always send all the gigs; the
> following completes in ~no time:

So you are saying the behavior is unpredictable (from the user's perspective)?

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 19 20:20:29 2007

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.