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

Re: [PATCH] Disallow going below root in svnserve - take two

From: Nuutti Kotivuori <naked_at_iki.fi>
Date: 2002-12-18 01:05:03 CET

Karl Fogel wrote:
> Nuutti Kotivuori <naked@iki.fi> writes:
>> Do take a peek at the INT_ERR() macro there - it's stolen almost
>> verbatim from 'svnadmin', but I don't know if that's still the way
>> to go or if it should be handled differently.
> If we're using the INT_ERR() in two places, and it's the same
> definition except for the internal symbol name, then it's probably
> time to abstract it into svn_error.h, what do you think?

Heh. Should've guessed that :-)

Now when I took a peek, actually we use it in three places already -
'svnadmin', 'svnlook' and now 'svnserve'. So, yes, that should be in
svn_error.h. But what should it be called, then? SVN_INT_ERR? I'm not
sure I understand the original intent in the naming.

Oh, and a peek to the commandline client reveals this:

| err = svn_utf_cstring_to_utf8 (&utf8_opt_arg, opt_arg, NULL, pool);
| if (! err)
| err = svn_stringbuf_from_file (&buffer, utf8_opt_arg, pool);
| if (! err)
| err = svn_utf_stringbuf_to_utf8 (&buffer_utf8, buffer, pool);
| if (err)
| {
| svn_handle_error (err, stdout, FALSE);
| svn_pool_destroy (pool);
| return EXIT_FAILURE;
| }

No define - and the behaviour is almost the same. Error to stdout
instead of stderr it seems, then the destruction of the pool and then
return instead of an exit() call.

If there's a nice way to handle this all, someone could chime in and
suggest it. But for the meantime, I'll put something like SVN_INT_ERR
in svn_error.h and convert 'svnadmin' and 'svnlook' to using that.

-- Naked

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 18 01:06:03 2002

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