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

Re: svn commit: r1222522 - /subversion/branches/1.7.x/STATUS

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Sat, 24 Dec 2011 11:54:51 +0100

On 24.12.2011 11:24, Branko Čibej wrote:

> I could easily turn your reasoning around and simply state that you're
> not using the libraries correctly, since you knew from day one that they
> can "throw unrecoverable errors" (which is what assert() is all about,

Sorry, that's not true.
The abuse of asserts was introduced to the svn library somewhere after
v1.2 or even later. The first versions returned errors.

And if there is a situation from which you can't recover, then please
use an assert. But since when is "path is not canonicalized" an
unrecoverable situation? And that's just the most obvious abuse, there
are many many more.

> after all), and therefore you should not be loading SVN libraries
> directly into an Explorer process but should instead spawn them in a
> separate, isolated daemon process and RPC that from your shell
> extension. Sounds fun? No doubt. My guess is that it's less work than
> making every possible error condition that the Subversion libraries can
> encounter recoverable.

maybe you have a 10GHz machine on your hands. But most people don't.
Using RPC for every svn API call would bring every machine down easily.
If you want to provide a library that's not safe to call in to from any
bigger process, then you have to either state that or provide your own
RPC mechanism.

> It's not even a valid argument to say that the libraries, such as they
> are now, are not suitable for UI development, since not every UI is such
> that a glitch in one of its plugins effectively brings down the whole
> system. The Explorer extension environment is an exception. It's
> basically your responsibility to take that into account, and whilst it's
> reasonable to expect the SVN libraries to meet you halfway, it's quite
> unreasonable to lay all the blame for your problems at their (rather,
> our) doorstep.

Explorer is of course a bigger issue than other apps using the svn
library. But other UI have the same issue.
I've mentioned this example before:
Imagine you're using an image editor (e.g. photoshop, paint.net, ...)
and instead of showing an error when loading a corrupted image and then
proceed, they would just show an assert dialog and then exit.
Do you _really_ think that's how an UI should work?

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2011-12-24 11:55:29 CET

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.