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

Re: [PATCH] include error codes in error messages

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 4 Feb 2008 21:31:20 +0100

On Mon, Feb 04, 2008 at 12:09:12PM -0800, Eric Gillespie wrote:
> Karl Fogel <kfogel_at_red-bean.com> writes:
> > Before we go farther with this, I'd like to know that no one (epg?)
> > objects strongly to the overall idea.
> I only objected to including source file/line information, as we
> do in debug mode. At least, that's all I intended to object to,
> and I hope that's what I wrote ;->.
> Can someone include sample output?

Bit ugly alright:

stsp_at_ted [tmp] $ svnadmin create repos
svnadmin: Repository creation failed (svn error 200011)
svnadmin: Could not create top-level directory (svn error 200011)
svnadmin: 'repos' exists and is non-empty (svn error 200011)
stsp_at_ted [tmp] $ rm -rf repos
stsp_at_ted [tmp] $ svnadmin create repos
stsp_at_ted [tmp] $ svn co file://tmp/repository
svn: Unable to open an ra_local session to URL (svn error 170000)
svn: Local URL 'file://tmp/repository' contains unsupported hostname (svn error 170000)
stsp_at_ted [tmp] $ svn co file:///tmp/repository
svn: Unable to open an ra_local session to URL (svn error 180001)
svn: Unable to open repository 'file:///tmp/repository' (svn error 180001)
stsp_at_ted [tmp] $ svn co svn co file:///tmp/repository wc
svn: 'svn' does not appear to be a URL (svn error 125002)
stsp_at_ted [tmp] $ svn co file:///tmp/repos wc
svn: 'wc' is already a working copy for a different URL (svn error 155000)
stsp_at_ted [tmp] $ rm -rf wc
stsp_at_ted [tmp] $ svn co file:///tmp/repos wc
Checked out revision 0.
stsp_at_ted [tmp] $ cd wc
stsp_at_ted [wc] $ svn rm abcd
svn: 'abcd' does not exist (svn error 125001)

> Is this causing more error
> messages to break weirdly at 80 columns?

A few maybe, one is shown above. I haven't checked all of them.
How would you check them all? I suppose by writing a small script
that uses the bindings somehow to print all the errors?

Should we print the codes in hex to make them shorter? :)

> I think the user knows to type "svn" along with the error code
> into a search engine. Those 4 extra characters eat up precious
> horizontal error message space. Alternatively, we could include
> just the outermost error code of a chain, printed on a separate
> line before the rest of the error output.

I also think including only the number of the outermost error would
look nicer. But it would defeat Karl's point a bit, wouldn't it?
What if the error the user wants to search for is not the outermost one?

Stefan Sperling <stsp_at_elego.de>                 Software Developer
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                 Geschaeftsfuehrer: Olaf Wagner

  • application/pgp-signature attachment: stored
Received on 2008-02-04 21:31:35 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.