You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Gillespie <ep...@google.com> on 2007/09/29 00:10:53 UTC
Re: svn commit: r26841 - in trunk/subversion: include libsvn_client svn tests/cmdline
dlr@tigris.org writes:
> Author: dlr
> Date: Fri Sep 28 13:36:13 2007
> New Revision: 26841
>
> Log:
> Fix issue #2880, 'svn commit --changelist NO_SUCH_CHANGELIST' should warn.
Hmm:
0 trunk% svn st --changelist fo
subversion/svn/main.c:1788: (apr_err=205000)
svn: Try 'svn help' for more info
subversion/svn/status-cmd.c:229: (apr_err=205000)
svn: no such changelist 'fo'
205000 is SVN_ERR_CL_ARG_PARSING_ERROR. I prefer
SVN_ERR_UNKNOWN_CHANGELIST, but it also looks like the error is
coming from different levels between these two commands. I
wonder if that's right...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [issue #2880] 'svn commit --changelist NO_SUCH_CHANGELIST' should warn
Posted by Ben Collins-Sussman <su...@red-bean.com>.
On 9/28/07, Daniel L. Rall <dl...@finemaltcoding.com> wrote:
> Oddly, 'commit' seems to handle changelists different than other commands,
> most of which use svn_client_get_changelist() to fill a list of changelist
> targets in the command-line client which is then fed to a library routine.
> 'commit', on the other hand, takes a changelist name and finds the changelist
> targets inside libsvn_client. Ben, what's the reasoning for this (e.g.
> structure of the commit harvesting logic)? Can/should we change this?
Most commands take a list of targets to work on, and thus use the
get_changelist() routine as a way of augmenting the target-list.
'svn commit', however, is unique in the way it searches the working
copy and harvests targets. cmpilato pointed out that in that case,
--changelist should act as a 'filter' on the harvested targets, rather
than an a-priori list of targets to grab.
I suppose we *could* change it, but ISTR there was an important reason
we didn't. Maybe cmike remembers?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [issue #2880] 'svn commit --changelist NO_SUCH_CHANGELIST' should warn
Posted by Daniel Rall <dl...@collab.net>.
On Fri, 28 Sep 2007, Daniel L. Rall wrote:
...
> I've changed the error code and messages to be consistent across both
> 'commit' and the other commands, but the output is still different (and
> likely the exit code, too), because the other commands are returning a
> hard error, while 'commit' is supressing an error and spitting out a warning.
>
> Which way should we go here?
>
> $ svn ci --changelist=is-not-here
> svn: warning: Unknown changelist 'is-not-here'
>
> $ svn st --changelist=is-not-here
> subversion/svn/status-cmd.c:230: (apr_err=200024)
> svn: Unknown changelist 'is-not-here'
For consistency with other commands, I made 'commit' return a hard
error (in r26879).
[issue #2880] 'svn commit --changelist NO_SUCH_CHANGELIST' should warn
Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
On Fri, 28 Sep 2007, Eric Gillespie wrote:
> dlr@tigris.org writes:
>
> > Author: dlr
> > Date: Fri Sep 28 13:36:13 2007
> > New Revision: 26841
> >
> > Log:
> > Fix issue #2880, 'svn commit --changelist NO_SUCH_CHANGELIST' should warn.
>
> Hmm:
>
> 0 trunk% svn st --changelist fo
> subversion/svn/main.c:1788: (apr_err=205000)
> svn: Try 'svn help' for more info
> subversion/svn/status-cmd.c:229: (apr_err=205000)
> svn: no such changelist 'fo'
>
> 205000 is SVN_ERR_CL_ARG_PARSING_ERROR. I prefer
> SVN_ERR_UNKNOWN_CHANGELIST, but it also looks like the error is
> coming from different levels between these two commands. I
> wonder if that's right...
I agree that the error behavior should be consistent across commands...and
preferably, handled at single layer.
Oddly, 'commit' seems to handle changelists different than other commands,
most of which use svn_client_get_changelist() to fill a list of changelist
targets in the command-line client which is then fed to a library routine.
'commit', on the other hand, takes a changelist name and finds the changelist
targets inside libsvn_client. Ben, what's the reasoning for this (e.g.
structure of the commit harvesting logic)? Can/should we change this?
I've changed the error code and messages to be consistent across both
'commit' and the other commands, but the output is still different (and
likely the exit code, too), because the other commands are returning a
hard error, while 'commit' is supressing an error and spitting out a warning.
Which way should we go here?
$ svn ci --changelist=is-not-here
svn: warning: Unknown changelist 'is-not-here'
$ svn st --changelist=is-not-here
subversion/svn/status-cmd.c:230: (apr_err=200024)
svn: Unknown changelist 'is-not-here'
--
Daniel Rall