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

Re: " Inconsistent line-endings"

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2004-03-20 14:21:02 CET

Julian, Ben,

I think what you see here is a general problem with the way SVN handles it's
errors (currently).

The basis of subversion error handling is the principle that the call chain
returns (possible) errors and adds information to the error chain which is
created while returning. This way a chain of nested errors is created. The
lowest level generates a general message and higher levels have the opportunity
to add information as to what action was to be performed.

Currently the code uses the SVN_ERR macro all over the place, effectively
declining the opportunity to add this extra information and passing the error
up to higher levels.

In general I think that in several crucial places the SVN_ERR macro should
be replaced with the SVN_ERR_W macro to add information about the specific
action that was taken.

That way the output below would (possibly) become:

$ svn ci -m 'test2'
Sending foo
Transmitting file data .
svn: Commit failed (details follow):
svn: Error committing 'foo'
svn: Inconsistent line-endings in source stream

The first details line could be any of a number of possibilities ofcourse.

But, to get back to the issue: I don't think this is a problem of any
particular revision, but one in general. I think this is even generally considered
to be so. I have tried to find a bug describing this, but I could not find
it. Maybe now is the time to start finding a good solution to the general
problem?

bye,

Erik.

> Ben Reser wrote:
> >
> > In the process of looking for this I went looking for the error text.
> >
> > I couldn't find it. So I went and found it on the 1.0.x branch and then
> > found the code location on trunk. The error text was removed in r8908.
> >
> > We were outputing this in 1.0.x:
> > $ svn ci -m 'test2'
> > Sending foo
> > Transmitting file data .svn: Commit failed (details follow):
> > svn: Inconsistent line-endings in source stream
> >
> > Now we output:
> > $ ~/wc/svn-trunk/subversion/clients/cmdline/svn ci -m 'test2'
> > Sending foo
> > Transmitting file data .subversion/libsvn_client/commit.c:747:
> > (apr_err=135000)
> > svn: Commit failed (details follow):
> > subversion/libsvn_subr/subst.c:454: (apr_err=135000)
> >
> > Note the complete and utter lack of details that follow.
> >
> > I think the changes to subversion/libsvn_subr/time.c and
> > subversion/libsvn_subr/subst.c in r8908 should be reverted. Opinions?
>
> Only if we can't make it work the way r8908 was intended to work, which is
> that the generic error message corresponding to
> SVN_ERR_IO_INCONSISTENT_EOL should be printed without having to put a copy
of the message text in the
> source code at each point of call.
>
> - Julian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 20 14:21:19 2004

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.