[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: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-19 20:09:55 CEST

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.

> > 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.)

> > 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:

glasser_at_smiler:/tmp$ svn co --depth empty http://svn.collab.net/repos/svn/
 U svn
Checked out revision 27293.
glasser@smiler:/tmp$ cd svn
glasser@smiler:/tmp/svn$ svn up
At revision 27293.
glasser@smiler:/tmp/svn$

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
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:10:08 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.