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

Re: bug: --non-interactive is not global

From: <kfogel_at_collab.net>
Date: 2005-07-11 22:10:47 CEST

Leo Savernik <l.savernik@aon.at> writes:
> I'm not doubting the general principle at all. It's especially about the
> --non-interactive option which is automatically perceived as an inherently
> global option. To --non-interactive, the general principle doesn't apply, as
> you correctly state, because it will always mean the same for any command.
> Furthermore, any command disallowing --non-interactive is non-interactive by
> default, so there would be no contradiction in permitting --non-interactive
> even on those commands.

These are excellent points. I'm CC'ing dev@ here to see what other
developers say. Folks, Leo's proposal is to make all non-interactive
commands silently accept '--non-interactive', so that when writing
scripts one can just pass it promiscuously and not worry about whether
it's applicable or not. Above, he points out why '--non-interactive'
should be treated specially this way.

To implement it, I guess we'd handle it like we handle the '--help'
option, as in this code in subversion/clients/cmdline/main.c:

  /* Check that the subcommand wasn't passed any inappropriate options. */
  for (i = 0; i < received_opts->nelts; i++)
      opt_id = APR_ARRAY_IDX (received_opts, i, int);

      /* All commands implicitly accept --help, so just skip over this
         when we see it. Note that we don't want to include this option
         in their "accepted options" list because it would be awfully
         redundant to display it in every commands' help text. */
      if (opt_id == 'h' || opt_id == '?')


Thoughts? Anyone? Bueller?


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 11 22:59:48 2005

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.