You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2002/08/01 12:57:53 UTC

Bikeshed: --quiet option

When I was writing some scripts to test the performance of
skip-deltas, I noted that the treatment of the "-q" option seemed a
little odd to me.  "svn ci -q" would omit the file statuses but would
still print "\nCommitted revision N.\n"; and the -q option didn't
apply at all to "svn update" or "svn add".

Now that I'm coming back to this, I'm a little unsure about what the
right behavior is.  If we review how the -q option works in other
commands, we see two different classes of behaviors:

  * "Silence is golden": In some cases, like rsync or scp, the -q
    switch is equivalent to redirecting stdout to /dev/null.  The idea
    is to turn a noisy command into something more like a traditional
    Unix utility, which never writes anything to stdout unless that's
    its primary function.

  * "Speak softly": In other cases, like cvs, the -q switch reduces
    chatter but leaves some informational messages alone.  In the cvs
    case, per-directory messages go away but the file status messages
    stay.

Since we don't have per-directory scanning messages in svn (and I'm
guessing we don't want them, at least not without a -v option), I'm
guessing the "speak softly" model would omit file status messages but
would retain messages about revision numbers:

  % svn -q co URL wc
  Checked out revision 1001.
  % cd wc
  % svn -q update
  At revision 1003.
  % touch newfile
  % svn -q add newfile
  % svn -q mv somefile someotherfile
  % svn -q ci -m "Some log message"
  Committed revision 1004.

("svn -q ls" or "svn -q st" would be errors; "ls --quiet" makes no
sense and neither does "svn ls --quiet".)

I'd like to implement one of the models, but I'm not sure which.  I'm
guessing there isn't much to say on this topic beyond what I've
already said, so we can probably take it immediately to a vote on
preference.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Kieran <ki...@esperi.demon.co.uk> writes:
> ...except that errors are still output, I presume?
> 
> And are errors less verbose?

Errors are output the same.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Kieran <ki...@esperi.demon.co.uk>.
On 1 Aug 2002, Karl Fogel wrote:

> Greg Hudson <gh...@MIT.EDU> writes:
> > I'd like to implement one of the models, but I'm not sure which.  I'm
> > guessing there isn't much to say on this topic beyond what I've
> > already said, so we can probably take it immediately to a vote on
> > preference.
>
> Actually, I think the rules are (or should be):
>
>    * For a command which has no other effect besides printing
>      information, "-q" means "speak softly", that is, just print less
>      information.  That is the current behavior of "svn status -q".
>
>      (There's no other reasonable meaning for -q on such commands,
>      since the "silence is golden" interpretation would make them
>      no-ops, so overloading it to mean "speak softly" seems useful.)
>
>    * For a command which has some non-printing effect, such as commit
>      or update, "-q" should mean "silence is golden", and suppress all
>      output.  The fact that commits and updates don't currently do
>      this is an oversight, not a conscious decision.
>
> ?,

...except that errors are still output, I presume?

And are errors less verbose?

Regards

Kieran


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> I'd like to implement one of the models, but I'm not sure which.  I'm
> guessing there isn't much to say on this topic beyond what I've
> already said, so we can probably take it immediately to a vote on
> preference.

Actually, I think the rules are (or should be):

   * For a command which has no other effect besides printing
     information, "-q" means "speak softly", that is, just print less
     information.  That is the current behavior of "svn status -q".

     (There's no other reasonable meaning for -q on such commands,
     since the "silence is golden" interpretation would make them
     no-ops, so overloading it to mean "speak softly" seems useful.)

   * For a command which has some non-printing effect, such as commit
     or update, "-q" should mean "silence is golden", and suppress all
     output.  The fact that commits and updates don't currently do
     this is an oversight, not a conscious decision.

?,
-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Alexis Huxley <ah...@gmx.net>.
Karl wrote:

> Actually, I think the rules are (or should be):
> 
>    * For a command which has no other effect besides printing
>      information, "-q" means "speak softly", that is, just print less
>      information.  ...
>
>    * For a command which has some non-printing effect, such as commit
>      or update, "-q" should mean "silence is golden", and suppress all
>      output.  ...

Alexis wrote:

> > .... I point out that the behaviour of 'tar' is exactly what Karl 
> > mentioned:
> > 
> >         tar t           as a accessor is never totally silent but
> >                         it does have 'v' option to make it loud.
> > 
> >         tar [cx]        are totally silent except when given the
> >                         'v'

Greg wrote:

> ... tar is silent unless you explicitly tell it to be noisy.  

No ... - as I said above - 'tar t' produces output without '-v'. Try
it.

> Karl was saying that Subversion mutator
> commands would be silent if given -q, but noisy by default.

Perhaps I was not as clear as I could have been:

I realise that Karl's 'logic' is reversed (i.e. the suggestion
that -q makes svn quiet instead of tar's -v making tar verbose),
and that obviously this implies a different default behaviour. But
the underlying philosophy is the same:

Sub-commands which you only run to produce output should never be
totally silencable, but sub-commands which you run for other reasons
*are* totally silencable.

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2002-08-02 at 10:54, Alexis Huxley wrote:
> .... I point out that the behaviour of 'tar' is exactly what Karl 
> mentioned:

No... like most Unix mutator commands, tar is silent unless you
explicitly tell it to be noisy.  Karl was saying that Subversion mutator
commands would be silent if given -q, but noisy by default.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Alexis Huxley <ah...@gmx.net>.
> Looking beyond that, I think Karl's method might be overly aggressive
> ...
> that I'm not sure about.  Maybe someone might like the option of a
> "speak softly" for mutators as well.  You know, perhaps I'd like to

Yes, yes, bikeshed, I know, bbbbbbbut ..... 

.... I point out that the behaviour of 'tar' is exactly what Karl 
mentioned:

	tar t		as a accessor is never totally silent but
			it does have 'v' option to make it loud.

	tar [cx]	are totally silent except when given the
			'v'

Also that many commands have the one of the behaviours (a) without
'-v' they are totally silent or (b) with '-q' they are totally
silent - except - as Karl pointed out - when there are errors.

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
By the way, I was so glib in expressing my preferences because I
assumed that you're planning to implement whatever solution we came up
with, Greg.  It sounded like you were... If that inference is
incorrect, just say the word :-).

-K

Karl Fogel <kf...@newton.ch.collab.net> writes:
> -0
> 
> +1
> 
> +0
> 
> -0

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Thanks for organizing this discussion so well, Greg.

> Given our desire to save on single-letter options, I think the four
> choices are:
> 
>   * Get rid of -q for all mutators (it would retain its meaning in "svn
>     st", which is the only accessor to currently use it).  Tell people
>     to redirect to /dev/null for "silence is golden".  Decide nobody
>     wants to see just the "revision N" messages.  (Favored by Scott
>     Lamb.)

-0

>   * Make -q "silence is golden" for mutators.  Decide nobody wants to
>     see just the "revision N" messages.  (Favored by Karl, and also by
>     me.)

+1

>   * Make -q "speak softly" for mutators, displaying only the revision N
>     message.  For "silence is golden", you have to redirect to
>     /dev/null.

+0

>   * Make -q "speak softly" for mutators, and -q -q "silence is
>     golden".  (Suggested by William Uther.)

-0

I think all the reasons for the above preferences have already been
said, so I'll just leave it at that.

> I would like to see a "silence is golden" option, because I think that
> noisy mutator commands should be somewhat apologetic about it, which
> means providing a nice pretty option to turn off the noise.  But I'm
> happy to implement any consensus which makes the situation more
> consistent than it is.

How about a --very-quiet flag?  Not so easy for humans, but great for
scripts and such.  And could be set as a config option, too.

Unlike the -V flag, we know right away that we'd actually use it :-).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by cm...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:

> Given our desire to save on single-letter options, I think the four
> choices are:
> 
>   * Get rid of -q for all mutators (it would retain its meaning in "svn
>     st", which is the only accessor to currently use it).  Tell people
>     to redirect to /dev/null for "silence is golden".  Decide nobody
>     wants to see just the "revision N" messages.  (Favored by Scott
>     Lamb.)
> 
>   * Make -q "silence is golden" for mutators.  Decide nobody wants to
>     see just the "revision N" messages.  (Favored by Karl, and also by
>     me.)
> 
>   * Make -q "speak softly" for mutators, displaying only the revision N
>     message.  For "silence is golden", you have to redirect to
>     /dev/null.
> 
>   * Make -q "speak softly" for mutators, and -q -q "silence is
>     golden".  (Suggested by William Uther.)
> 
> That's basically the matrix of the two orthogonal questions "should we
> provide a simple way for scripts to get silent behavior from mutators?"
> and "should we provide a way to see only the revision N messages from
> mutators?".
> 
> I would like to see a "silence is golden" option, because I think that
> noisy mutator commands should be somewhat apologetic about it, which
> means providing a nice pretty option to turn off the noise.  But I'm
> happy to implement any consensus which makes the situation more
> consistent than it is.

Alright, I'm convinced.  I'll take Karl's approach.  -q is the only
option, and it means "speak softly" for accessors and "silence is
golden" for mutators.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2002-08-02 at 10:14, cmpilato@collab.net wrote:
> So, first of all, [the -V] flag should probably get removed.

Right.  Sounds good.  Hopefully no argument from anyone there.  (If we
really want a "very verbose" in the future, we could do it with -v -v;
there's lots of precedent for that.)

> Looking beyond that, I think Karl's method might be overly aggressive
> in the feedback filtering.

So, Karl expressed some doubt as to whether anyone would really want
just the "revision N" messages (from svn ci/co/update, and from svn
cp/rm/mv if the target is a URL).  And he's probably right; it's a
little far-fetched.  In CVS, it's really easy to imagine cases where you
want to see the "U filename" cases but not the "Updating directory blah"
cases.  It's less easy to imagine people wanting only the "revision N"
messages in Subversion.

Given our desire to save on single-letter options, I think the four
choices are:

  * Get rid of -q for all mutators (it would retain its meaning in "svn
    st", which is the only accessor to currently use it).  Tell people
    to redirect to /dev/null for "silence is golden".  Decide nobody
    wants to see just the "revision N" messages.  (Favored by Scott
    Lamb.)

  * Make -q "silence is golden" for mutators.  Decide nobody wants to
    see just the "revision N" messages.  (Favored by Karl, and also by
    me.)

  * Make -q "speak softly" for mutators, displaying only the revision N
    message.  For "silence is golden", you have to redirect to
    /dev/null.

  * Make -q "speak softly" for mutators, and -q -q "silence is
    golden".  (Suggested by William Uther.)

That's basically the matrix of the two orthogonal questions "should we
provide a simple way for scripts to get silent behavior from mutators?"
and "should we provide a way to see only the revision N messages from
mutators?".

I would like to see a "silence is golden" option, because I think that
noisy mutator commands should be somewhat apologetic about it, which
means providing a nice pretty option to turn off the noise.  But I'm
happy to implement any consensus which makes the situation more
consistent than it is.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by cm...@collab.net.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Greg Hudson <gh...@MIT.EDU> writes:
> > So, Karl's approach was "silence is golden" for mutators and "speak
> > softly" for accessors.  What you've described is "speak softly" for
> > everything.  Just so you know that you're not actually leaning towards
> > his approach.
> 
> Bingo on the description, Greg.  Mike, what are your true feelings?
> (Don't be shy now...)

Hm.  Running the following reveals that we currently have no
subcommands which claim to accept the --very-verbose flag:

   for i in `svn help | grep -e '^   .' | cut -d ' ' -f 4`; do 
       svn help ${i} | grep -e '--very-verbose'
   done

So, first of all, that flag should probably get removed.

Looking beyond that, I think Karl's method might be overly aggressive
in the feedback filtering.  I like the "speak softly" for accessors --
as was noted, if you ran a command that exist for just dumping
information, you shouldn't need a "silence is golden" mechanism for
that.  It's the "silence is golden" as the only option for mutators
that I'm not sure about.  Maybe someone might like the option of a
"speak softly" for mutators as well.  You know, perhaps I'd like to
run `svn ci -q' and have it only tell me "Committed revision 123."  Or
run `svn co' and have it only tell me "Checked out revision 456."

+1 on "speak softly" for accessors
+0 on "speak softly" for mutators
+0 on "silence is golden" (in light of /dev/null and NIL)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> So, Karl's approach was "silence is golden" for mutators and "speak
> softly" for accessors.  What you've described is "speak softly" for
> everything.  Just so you know that you're not actually leaning towards
> his approach.

Bingo on the description, Greg.  Mike, what are your true feelings?
(Don't be shy now...)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2002-08-01 at 15:34, cmpilato@collab.net wrote:
> I probably lean more toward Karl's approach.  If -Q means "tell me
> nothing" then I can accompish that with '> /dev/null' (or '> nil' on
> Windows).

Sure; a "silence is golden" flag is purely cosmetic.  (Er, assuming
Windows has separate stdout and stderr streams, anyway.)  I still like
having such a flag, since it makes scripts easier to read, but I can
understand not wanting to waste a letter on it.

> I think we could just make -q mean *something* on a
> per-subcommand basis, documenting such in the usage messages:

Right now we can't document options differently for different commands. 
(This is not an intrinsic limitation, just the way things are
structured.)

>   status -- doesn't show unversioned things
>   commit -- only shows new revision line
>   update -- only shows "updated to" line (and maybe conflicts?)
>   checkout -- only shows "checked out" line

So, Karl's approach was "silence is golden" for mutators and "speak
softly" for accessors.  What you've described is "speak softly" for
everything.  Just so you know that you're not actually leaning towards
his approach.

Karl asked me to post my patch (which implements -q for "speak softly"
and -Q for "silence is golden"), so here it is:

Flesh out -q (--quiet), and add -Q (--very-quiet).

* cl.h (svn_cl__opt_state_t): Add very_quiet flag.
* cl.h, feedback.c (svn_cl__get_notifier): Take opt_state structure;
  use it to decide whether to punt on the notifier complete
  (very_quiet) or print only the final message (quiet).  Desupport
  suppress_final_line; nothing was using it.  All call-sites changed.
  (notify, notify_baton): Desupport suppress_final_line; instead
  support only_final_line.
* util.c (svn_cl__print_commit_info): Don't print the initial newline;
  only "commit" and "import" actually want it, and then only if quiet
  isn't specified.  All call-sites changed not to call if very_quiet
  is set.
* merge-cmd.c (svn_cl__merge): Initialize notify_func to NULL since
  svn_cl__get_notifier() can be a no-op now.
* main.c (svn_cl__option, main): Add -Q option.  Also, make -V set
  verbose (not like anything uses -V yet).
* svn_help_log_switch_stdout: Update golden help output text.

Index: ./subversion/clients/cmdline/merge-cmd.c
===================================================================
--- ./subversion/clients/cmdline/merge-cmd.c
+++ ./subversion/clients/cmdline/merge-cmd.c	Thu Aug  1 12:23:19 2002
@@ -45,7 +45,7 @@
   const char *sourcepath1, *sourcepath2, *targetpath;
   svn_boolean_t using_alternate_syntax = FALSE;
   svn_error_t *err;
-  svn_wc_notify_func_t notify_func;
+  svn_wc_notify_func_t notify_func = NULL;
   void *notify_baton;
 
   auth_baton = svn_cl__make_auth_baton (opt_state, pool);
@@ -131,8 +131,7 @@
           fflush (stdout);
   */
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   err = svn_client_merge (notify_func, notify_baton,
                           auth_baton,
Index: ./subversion/clients/cmdline/cl.h
===================================================================
--- ./subversion/clients/cmdline/cl.h
+++ ./subversion/clients/cmdline/cl.h	Thu Aug  1 12:03:47 2002
@@ -78,6 +78,7 @@
   const char *ancestor_path;     /* ### todo: who sets this? */
   svn_boolean_t force;           /* be more forceful, as in "svn rm -f ..." */
   svn_boolean_t quiet;           /* sssh...avoid unnecessary output */
+  svn_boolean_t very_quiet;      /* print only error messages */
   svn_boolean_t version;         /* print version information */
   svn_boolean_t verbose;         /* be verbose */
   svn_boolean_t very_verbose;    /* be obnoxious, or at least really verbose */
@@ -344,7 +345,7 @@
 void svn_cl__get_notifier (svn_wc_notify_func_t *notify_func_p,
                            void **notify_baton_p,
                            svn_boolean_t is_checkout,
-                           svn_boolean_t suppress_final_line,
+                           svn_cl__opt_state_t *opt_state,
                            apr_pool_t *pool);
 
 
Index: ./subversion/clients/cmdline/checkout-cmd.c
===================================================================
--- ./subversion/clients/cmdline/checkout-cmd.c
+++ ./subversion/clients/cmdline/checkout-cmd.c	Thu Aug  1 11:27:59 2002
@@ -92,8 +92,7 @@
       (*((const char **) apr_array_push (targets))) = local_dir;
     }
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, FALSE, pool); 
+  svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, opt_state, pool);
 
   subpool = svn_pool_create (pool);
   for (i = 0; i < targets->nelts - 1; ++i)
Index: ./subversion/clients/cmdline/move-cmd.c
===================================================================
--- ./subversion/clients/cmdline/move-cmd.c
+++ ./subversion/clients/cmdline/move-cmd.c	Thu Aug  1 12:03:39 2002
@@ -59,8 +59,7 @@
   src_path = ((const char **) (targets->elts))[0];
   dst_path = ((const char **) (targets->elts))[1];
   
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool); 
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   err = svn_client_move 
            (&commit_info, 
@@ -73,7 +72,7 @@
   if (err)
     return svn_cl__may_need_force (err);
 
-  if (commit_info)
+  if (commit_info && ! opt_state->very_quiet)
     svn_cl__print_commit_info (commit_info);
 
   return SVN_NO_ERROR;
Index: ./subversion/clients/cmdline/mkdir-cmd.c
===================================================================
--- ./subversion/clients/cmdline/mkdir-cmd.c
+++ ./subversion/clients/cmdline/mkdir-cmd.c	Thu Aug  1 12:03:33 2002
@@ -52,8 +52,7 @@
   if (! targets->nelts)
     return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool); 
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   /* Build an authentication object to give to libsvn_client. */
   auth_baton = svn_cl__make_auth_baton (opt_state, pool);
@@ -67,7 +66,7 @@
                 &svn_cl__get_log_message,
                 svn_cl__make_log_msg_baton (opt_state, NULL, pool),
                 notify_func, notify_baton, pool));
-      if (commit_info)
+      if (commit_info && ! opt_state->very_quiet)
         svn_cl__print_commit_info (commit_info);
     }
 
Index: ./subversion/clients/cmdline/revert-cmd.c
===================================================================
--- ./subversion/clients/cmdline/revert-cmd.c
+++ ./subversion/clients/cmdline/revert-cmd.c	Thu Aug  1 11:29:47 2002
@@ -52,8 +52,7 @@
   if (! targets->nelts)
     return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool); 
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool); 
 
   subpool = svn_pool_create (pool);
   for (i = 0; i < targets->nelts; i++)
Index: ./subversion/clients/cmdline/copy-cmd.c
===================================================================
--- ./subversion/clients/cmdline/copy-cmd.c
+++ ./subversion/clients/cmdline/copy-cmd.c	Thu Aug  1 12:03:20 2002
@@ -89,8 +89,8 @@
   else if ((src_is_url) && (! dst_is_url))
     {
       /* URL->WC : Use checkout-style notification. */
-      if (! opt_state->quiet)
-        svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, FALSE, pool);
+      svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, opt_state,
+                            pool);
     }
   else
     /* URL->URL : No notification needed. */
@@ -104,7 +104,7 @@
             notify_func, notify_baton,
             pool));
 
-  if (commit_info)
+  if (commit_info && ! opt_state->very_quiet)
     svn_cl__print_commit_info (commit_info);
 
   return SVN_NO_ERROR;
Index: ./subversion/clients/cmdline/util.c
===================================================================
--- ./subversion/clients/cmdline/util.c
+++ ./subversion/clients/cmdline/util.c	Thu Aug  1 11:59:18 2002
@@ -340,7 +340,7 @@
 {
   if ((commit_info) 
       && (SVN_IS_VALID_REVNUM (commit_info->revision)))
-    printf ("\nCommitted revision %" SVN_REVNUM_T_FMT ".\n",
+    printf ("Committed revision %" SVN_REVNUM_T_FMT ".\n",
             commit_info->revision);
 
   return;
Index: ./subversion/clients/cmdline/update-cmd.c
===================================================================
--- ./subversion/clients/cmdline/update-cmd.c
+++ ./subversion/clients/cmdline/update-cmd.c	Thu Aug  1 11:29:58 2002
@@ -59,8 +59,7 @@
                                          targets,
                                          pool));
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   for (i = 0; i < condensed_targets->nelts; i++)
     {
Index: ./subversion/clients/cmdline/add-cmd.c
===================================================================
--- ./subversion/clients/cmdline/add-cmd.c
+++ ./subversion/clients/cmdline/add-cmd.c	Thu Aug  1 11:35:13 2002
@@ -54,8 +54,7 @@
   if (! targets->nelts)
     return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
       
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   subpool = svn_pool_create (pool);
   for (i = 0; i < targets->nelts; i++)
Index: ./subversion/clients/cmdline/commit-cmd.c
===================================================================
--- ./subversion/clients/cmdline/commit-cmd.c
+++ ./subversion/clients/cmdline/commit-cmd.c	Thu Aug  1 12:01:27 2002
@@ -84,8 +84,7 @@
   else
     revnum = SVN_INVALID_REVNUM; /* no matter, this is fine */
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   /* Commit. */
   SVN_ERR (svn_client_commit
@@ -99,8 +98,14 @@
             revnum,
             opt_state->nonrecursive,
             pool));
+
   if (commit_info)
-    svn_cl__print_commit_info (commit_info);
+    {
+      if (! opt_state->quiet)
+        printf("\n");
+      if (! opt_state->very_quiet)
+        svn_cl__print_commit_info (commit_info);
+    }
 
   return SVN_NO_ERROR;
 }
Index: ./subversion/clients/cmdline/switch-cmd.c
===================================================================
--- ./subversion/clients/cmdline/switch-cmd.c
+++ ./subversion/clients/cmdline/switch-cmd.c	Thu Aug  1 11:29:53 2002
@@ -92,8 +92,7 @@
   else if (entry->kind == svn_node_dir)
     parent_dir = target;
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   /* Do the 'switch' update. */
   SVN_ERR (svn_client_switch
Index: ./subversion/clients/cmdline/delete-cmd.c
===================================================================
--- ./subversion/clients/cmdline/delete-cmd.c
+++ ./subversion/clients/cmdline/delete-cmd.c	Thu Aug  1 12:03:23 2002
@@ -70,8 +70,7 @@
   if (! targets->nelts)
     return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   /* Build an authentication object to give to libsvn_client. */
   auth_baton = svn_cl__make_auth_baton (opt_state, pool);
@@ -91,7 +90,7 @@
          notify_func, notify_baton, subpool);
       if (err)
         return svn_cl__may_need_force (err);
-      if (commit_info)
+      if (commit_info && ! opt_state->very_quiet)
         svn_cl__print_commit_info (commit_info);
       
       svn_pool_clear (subpool);
Index: ./subversion/clients/cmdline/import-cmd.c
===================================================================
--- ./subversion/clients/cmdline/import-cmd.c
+++ ./subversion/clients/cmdline/import-cmd.c	Thu Aug  1 12:16:40 2002
@@ -115,9 +115,7 @@
   else
     revnum = SVN_INVALID_REVNUM; /* no matter, this is fine */
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton,
-                          FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
 
   SVN_ERR (svn_client_import 
            (&commit_info,
@@ -134,7 +132,12 @@
             pool));
 
   if (commit_info)
-    svn_cl__print_commit_info (commit_info);
+    {
+      if (! opt_state->quiet)
+        printf("\n");
+      if (! opt_state->very_quiet)
+        svn_cl__print_commit_info (commit_info);
+    }
 
   return SVN_NO_ERROR;
 }
Index: ./subversion/clients/cmdline/resolve-cmd.c
===================================================================
--- ./subversion/clients/cmdline/resolve-cmd.c
+++ ./subversion/clients/cmdline/resolve-cmd.c	Thu Aug  1 11:29:41 2002
@@ -53,8 +53,7 @@
     return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
     
   subpool = svn_pool_create (pool);
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, FALSE, opt_state, pool);
   
   for (i = 0; i < targets->nelts; i++)
     {
Index: ./subversion/clients/cmdline/export-cmd.c
===================================================================
--- ./subversion/clients/cmdline/export-cmd.c
+++ ./subversion/clients/cmdline/export-cmd.c	Thu Aug  1 11:28:37 2002
@@ -59,8 +59,7 @@
   else
     to = ((const char **) (targets->elts))[1];
 
-  if (! opt_state->quiet)
-    svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, FALSE, pool);
+  svn_cl__get_notifier (&notify_func, &notify_baton, TRUE, opt_state, pool);
 
   /* Do the export. */
   SVN_ERR (svn_client_export (from,
Index: ./subversion/clients/cmdline/feedback.c
===================================================================
--- ./subversion/clients/cmdline/feedback.c
+++ ./subversion/clients/cmdline/feedback.c	Thu Aug  1 11:36:03 2002
@@ -38,7 +38,7 @@
 {
   svn_boolean_t received_some_change;
   svn_boolean_t is_checkout;
-  svn_boolean_t suppress_final_line;
+  svn_boolean_t only_final_line;
   svn_boolean_t sent_first_txdelta;
   apr_pool_t *pool;
 };
@@ -64,6 +64,9 @@
   const char *path_native;
   svn_error_t *err;
 
+  if (nb->only_final_line && (action != svn_wc_notify_update_completed))
+    return;
+
   /* Always print some path */
   if (path[0] == '\0')
     path = ".";
@@ -153,33 +156,28 @@
       break;
 
     case svn_wc_notify_update_completed:
-      {
-        if (! nb->suppress_final_line)
-          {
-            if (SVN_IS_VALID_REVNUM (revision))
-              {
-                if (nb->is_checkout)
-                  printf ("Checked out revision %" SVN_REVNUM_T_FMT ".\n",
-                          revision);
-                else
-                  {
-                    if (nb->received_some_change)
-                      printf ("Updated to revision %" SVN_REVNUM_T_FMT ".\n",
-                              revision);
-                    else
-                      printf ("At revision %" SVN_REVNUM_T_FMT ".\n",
-                              revision);
-                  }
-              }
-            else  /* no revision */
-              {
-                if (nb->is_checkout)
-                  printf ("Checkout complete.\n");
-                else
-                  printf ("Update complete\n");
-              }
-          }
-      }
+      if (SVN_IS_VALID_REVNUM (revision))
+        {
+          if (nb->is_checkout)
+            printf ("Checked out revision %" SVN_REVNUM_T_FMT ".\n",
+                    revision);
+          else
+            {
+              if (nb->received_some_change)
+                printf ("Updated to revision %" SVN_REVNUM_T_FMT ".\n",
+                        revision);
+              else
+                printf ("At revision %" SVN_REVNUM_T_FMT ".\n",
+                        revision);
+            }
+        }
+      else  /* no revision */
+        {
+          if (nb->is_checkout)
+            printf ("Checkout complete.\n");
+          else
+            printf ("Update complete\n");
+        }
 
       break;
 
@@ -227,15 +225,19 @@
 svn_cl__get_notifier (svn_wc_notify_func_t *notify_func_p,
                       void **notify_baton_p,
                       svn_boolean_t is_checkout,
-                      svn_boolean_t suppress_final_line,
+                      svn_cl__opt_state_t *opt_state,
                       apr_pool_t *pool)
 {
-  struct notify_baton *nb = apr_palloc (pool, sizeof (*nb));
+  struct notify_baton *nb;
+
+  if (opt_state->very_quiet)
+    return;
 
+  nb = apr_palloc (pool, sizeof (*nb));
   nb->received_some_change = FALSE;
   nb->sent_first_txdelta = FALSE;
   nb->is_checkout = is_checkout;
-  nb->suppress_final_line = suppress_final_line;
+  nb->only_final_line = opt_state->quiet;
   nb->pool = pool;
 
   *notify_func_p = notify;
Index: ./subversion/clients/cmdline/main.c
===================================================================
--- ./subversion/clients/cmdline/main.c
+++ ./subversion/clients/cmdline/main.c	Thu Aug  1 12:14:49 2002
@@ -54,7 +54,8 @@
     /* ### APR is broken. we can't pass NULL for the name, as the doc says */
     {"--eek--",       '?', 0, "show help on a subcommand"},
     {"message",       'm', 1, "specify commit message \"ARG\""},
-    {"quiet",         'q', 0, "print as little as possible"},
+    {"quiet",         'q', 0, "print only important information"},
+    {"very-quiet",    'Q', 0, "print only error messages"},
     {"recursive",     'R', 0, "descend recursively"},
     {"nonrecursive",  'N', 0, "operate on single directory only"},
     {"revision",      'r', 1, "specify revision number ARG (or X:Y range)"},
@@ -127,7 +128,7 @@
     "Put files and directories under revision control, scheduling\n"
     "them for addition to repository.  They will be added in next commit.\n"
     "usage: svn add [OPTIONS] [TARGETS]\n", 
-    {svn_cl__targets_opt, 'R'} },
+    {svn_cl__targets_opt, 'R', 'q', 'Q' } },
 
   { "checkout", svn_cl__checkout, {"co"},
     "Check out a working copy from a repository.\n"
@@ -136,7 +137,7 @@
     "  be used as the destination. If multiple URLs are given each will be\n"
     "  checked out into a sub-directory of DESTINATION, with the name of the\n"
     "  sub-directory being the basename of the URL.\n",
-    {'r', 'D', 'q', 'N',
+    {'r', 'D', 'q', 'Q', 'N',
      svn_cl__auth_username_opt, svn_cl__auth_password_opt,
      svn_cl__xml_file_opt }  },
 
@@ -151,7 +152,7 @@
     "usage: svn commit [TARGETS]\n\n"
     "  Be sure to use one of -m or -F to send a log message;\n"
     "  the -r switch is only for use with --xml-file.\n",
-    {'m', 'F', 'q', 'N', svn_cl__targets_opt,
+    {'m', 'F', 'q', 'Q', 'N', svn_cl__targets_opt,
      svn_cl__force_opt, svn_cl__auth_username_opt, svn_cl__auth_password_opt,
      svn_cl__xml_file_opt, 'r', svn_cl__msg_encoding_opt} },
   
@@ -163,7 +164,7 @@
     "    WC  -> URL:  immediately commit a copy of WC to URL\n"
     "    URL -> WC:   check out URL into WC, schedule for addition\n"
     "    URL -> URL:  complete server-side copy;  used to branch & tag\n",
-    {'m', 'F', 'r', 'D',
+    {'m', 'F', 'r', 'D', 'q', 'Q',
      svn_cl__auth_username_opt, svn_cl__auth_password_opt,
      svn_cl__msg_encoding_opt} },
   
@@ -178,7 +179,7 @@
     "    behaviour.\n"
     "  * If run on an URL, item is deleted from the repository via an\n"
     "    immediate commit.\n",
-    {svn_cl__force_opt, 'm', 'F', svn_cl__targets_opt,
+    {svn_cl__force_opt, 'm', 'F', 'q', 'Q', svn_cl__targets_opt,
      svn_cl__auth_username_opt, svn_cl__auth_password_opt,
      svn_cl__msg_encoding_opt} },
   
@@ -211,7 +212,8 @@
     "      not under revision control will not be copied.\n\n"
     "      NOTE: If PATH is omitted, the last component of the URL is used\n"
     "      for the local directory name.\n",
-    {'r', 'D', 'q', svn_cl__auth_username_opt, svn_cl__auth_password_opt} },
+    {'r', 'D', 'q', 'Q',
+     svn_cl__auth_username_opt, svn_cl__auth_password_opt} },
 
   { "help", svn_cl__help, {"?", "h"},
     "Display this usage message.\n"
@@ -229,8 +231,9 @@
     "    If no 3rd arg, copy top-level contents of PATH into REPOS_URL\n"
     "    directly.  Otherwise, create NEW_ENTRY underneath REPOS_URL and\n"
     "    begin copy there.  (-r is only needed if importing to --xml-file)\n",
-    {'F', 'm', 'q', 'N', svn_cl__auth_username_opt, svn_cl__auth_password_opt,
-     svn_cl__xml_file_opt, 'r', svn_cl__msg_encoding_opt} },
+    {'F', 'm', 'q', 'Q', 'N', svn_cl__auth_username_opt,
+     svn_cl__auth_password_opt, svn_cl__xml_file_opt, 'r',
+     svn_cl__msg_encoding_opt} },
  
   { "info", svn_cl__info, {0},
     "Display info about a resource.\n"
@@ -272,7 +275,7 @@
     "    N and M default to HEAD if omitted.\n\n"
     "  * WCPATH is the working-copy path that will receive the changes.\n"
     "    If omitted, a default value of '.' is assumed.\n\n",
-    {'r', 'D', 'N', svn_cl__force_opt,
+    {'r', 'D', 'N', 'q', 'Q', svn_cl__force_opt,
      svn_cl__auth_username_opt, svn_cl__auth_password_opt} },
   
   { "mkdir", svn_cl__mkdir, {0},
@@ -280,7 +283,7 @@
     "usage: mkdir [NEW_DIR | REPOS_URL].\n\n"
     "    Either create NEW_DIR in working copy scheduled for addition,\n"
     "    or create REPOS_URL via immediate commit.\n",
-    {'m', 'F', svn_cl__auth_username_opt, svn_cl__auth_password_opt,
+    {'m', 'F', 'q', 'Q', svn_cl__auth_username_opt, svn_cl__auth_password_opt,
      svn_cl__msg_encoding_opt} },
 
   { "move", svn_cl__move, {"mv", "rename", "ren"},
@@ -290,18 +293,18 @@
     "  SRC and DST can both be working copy (WC) paths or URLs:\n"
     "    WC  -> WC:   move and schedule for addition (with history)\n"
     "    URL -> URL:  complete server-side rename.\n",    
-    {'m', 'F', 'r', 'D', svn_cl__auth_username_opt, svn_cl__auth_password_opt,
-     svn_cl__force_opt, svn_cl__msg_encoding_opt} },
+    {'m', 'F', 'r', 'D', 'q', 'Q', svn_cl__auth_username_opt,
+     svn_cl__auth_password_opt, svn_cl__force_opt, svn_cl__msg_encoding_opt} },
   
   { "propdel", svn_cl__propdel, {"pdel"},
     "Remove property PROPNAME on files and directories.\n"
     "usage: propdel PROPNAME [TARGETS]\n",
-    {'q', 'R'} },
+    {'q', 'Q', 'R'} },
   
   { "propedit", svn_cl__propedit, {"pedit", "pe"},
     "Edit property PROPNAME with $EDITOR on targets.\n"
     "usage: propedit PROPNAME [TARGETS]\n",
-    {0} },
+    {'q', 'Q'} },
   
   { "propget", svn_cl__propget, {"pget", "pg"},
     "Print value of property PROPNAME on files or directories.\n"
@@ -337,14 +340,14 @@
     "        whether to merge the file, and how to serve it from Apache.\n"
     "        A mimetype beginning with 'text/' (or an absent mimetype) is\n"
     "        treated as text.  Anything else is treated as binary.\n",
-    {'F', 'q', svn_cl__targets_opt, 'R'} },
+    {'F', 'q', 'Q', svn_cl__targets_opt, 'R'} },
   
   { "revert", svn_cl__revert, {0},
     "Restore pristine working copy file (undo all local edits)\n"
     "usage: revert TARGET1 [TARGET2 [TARGET3 ... ]]\n\n"
     "    Note:  this routine does not require network access, and \n"
     "    resolves any conflicted states.\n",
-    {svn_cl__targets_opt, 'R'} },
+    {svn_cl__targets_opt, 'R', 'q', 'Q'} },
 
   { "resolve", svn_cl__resolve, {0},
     "Remove 'conflicted' state on working copy files or directories.\n"
@@ -352,7 +355,7 @@
     "    Note:  this routine does not semantically resolve conflict markers;\n"
     "    it merely removes conflict-related artifact files and allows TARGET\n"
     "    to be committed again.\n",
-    {svn_cl__targets_opt, 'R'} },
+    {svn_cl__targets_opt, 'R', 'q', 'Q'} },
  
   { "status", svn_cl__status, {"stat", "st"},
     "Print the status of working copy files and directories.\n"
@@ -387,7 +390,8 @@
     "Update working copy to mirror a new URL\n"
     "usage: switch REPOS_URL [TARGET]\n\n"
     "   Note:  this is the way to move a working copy to a new branch.\n",
-    {'r', 'D', 'N', svn_cl__auth_username_opt, svn_cl__auth_password_opt} },
+    {'r', 'D', 'N', 'q', 'Q', svn_cl__auth_username_opt,
+     svn_cl__auth_password_opt} },
  
   { "update", svn_cl__update, {"up"}, 
     "Bring changes from the repository into the working copy.\n"
@@ -403,7 +407,7 @@
     "    U  Updated\n"
     "    C  Conflict\n"
     "    G  Merged\n",
-    {'r', 'D', 'N', svn_cl__auth_username_opt,
+    {'r', 'D', 'N', 'q', 'Q', svn_cl__auth_username_opt,
      svn_cl__auth_password_opt, svn_cl__xml_file_opt} },
 
   { NULL, NULL, {0}, NULL, {0} }
@@ -986,6 +990,7 @@
         opt_state.verbose = TRUE;
         break;
       case 'V':
+        opt_state.verbose = TRUE;
         opt_state.very_verbose = TRUE;
         break;
       case 'u':
@@ -998,6 +1003,10 @@
       case 'q':
         opt_state.quiet = TRUE;
         break;
+      case 'Q':
+        opt_state.quiet = TRUE;
+        opt_state.very_quiet = TRUE;
+        break;
       case svn_cl__xml_file_opt:
         err = svn_utf_cstring_to_utf8 (&opt_state.xml_file, opt_arg,
                                        NULL, pool);
Index: ./subversion/tests/clients/cmdline/getopt_tests_data/svn_help_log_switch_stdout
===================================================================
--- ./subversion/tests/clients/cmdline/getopt_tests_data/svn_help_log_switch_stdout
+++ ./subversion/tests/clients/cmdline/getopt_tests_data/svn_help_log_switch_stdout	Thu Aug  1 14:12:49 2002
@@ -33,6 +33,8 @@
   -r [--revision] arg      : specify revision number ARG (or X:Y range)
   -D [--date] arg          : specify a date ARG (instead of a revision)
   -N [--nonrecursive]      : operate on single directory only
+  -q [--quiet]             : print only important information
+  -Q [--very-quiet]        : print only error messages
   --username arg           : specify a username ARG
   --password arg           : specify a password ARG
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by cm...@collab.net.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Greg Hudson <gh...@MIT.EDU> writes:
> > > I think CVS uses -q and -Q for "speak softly" and "silence is golden"
> > > respectively.  I'd be pleased if we supported the same.
> > 
> > This sounds good to me.  I have it ready to commit; I'll assume that you
> > and I are both +1 on it.  Karl, are you at worst -0 on it?  (Since you
> > suggested something different.)
> 
> Er, hmmm.  I'd like to be -1 until we at least hear someone who wants
> (i.e., has a real-life use case for) a behavior other than the one I
> described in my previous mail.
> 
> The justification is merely that we should save short options.
> 
> I'm also not sure that Mike is really +1 on this, since he posted that
> before reading my mail proposing the other interpretation.  Mike?

I probably lean more toward Karl's approach.  If -Q means "tell me
nothing" then I can accompish that with '> /dev/null' (or '> nil' on
Windows).  I think we could just make -q mean *something* on a
per-subcommand basis, documenting such in the usage messages:

  status -- doesn't show unversioned things
  commit -- only shows new revision line
  update -- only shows "updated to" line (and maybe conflicts?)
  checkout -- only shows "checked out" line
  ...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> > I think CVS uses -q and -Q for "speak softly" and "silence is golden"
> > respectively.  I'd be pleased if we supported the same.
> 
> This sounds good to me.  I have it ready to commit; I'll assume that you
> and I are both +1 on it.  Karl, are you at worst -0 on it?  (Since you
> suggested something different.)

Er, hmmm.  I'd like to be -1 until we at least hear someone who wants
(i.e., has a real-life use case for) a behavior other than the one I
described in my previous mail.

The justification is merely that we should save short options.

I'm also not sure that Mike is really +1 on this, since he posted that
before reading my mail proposing the other interpretation.  Mike?

So I guess I'd just like to hear a bit more discussion.  But can you
post your patch in the meantime?

> We already have -v and -V for verbose and very-verbose, although no
> commands use -V right now.

The fact that no one uses -V yet is kind of revealing, I think :-).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2002-08-01 at 10:17, cmpilato@collab.net wrote:
> I think CVS uses -q and -Q for "speak softly" and "silence is golden"
> respectively.  I'd be pleased if we supported the same.

This sounds good to me.  I have it ready to commit; I'll assume that you
and I are both +1 on it.  Karl, are you at worst -0 on it?  (Since you
suggested something different.)

We already have -v and -V for verbose and very-verbose, although no
commands use -V right now.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Alexis Huxley <ah...@gmx.net>.
> I think CVS uses -q and -Q for "speak softly" and "silence is golden"
> respectively.  I'd be pleased if we supported the same.

Something like "less"'s 'LESS' env var would be nice. i.e.:

	SVN="-Q"; export SVN

Alternatively something similar in $HOME/.subversion. 

Sorry if there is such a thing already; the man/manual/FAQ don't mention
it.

Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by cm...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:

> When I was writing some scripts to test the performance of
> skip-deltas, I noted that the treatment of the "-q" option seemed a
> little odd to me.  "svn ci -q" would omit the file statuses but would
> still print "\nCommitted revision N.\n"; and the -q option didn't
> apply at all to "svn update" or "svn add".
> 
> Now that I'm coming back to this, I'm a little unsure about what the
> right behavior is.  If we review how the -q option works in other
> commands, we see two different classes of behaviors:
> 
>   * "Silence is golden": In some cases, like rsync or scp, the -q
>     switch is equivalent to redirecting stdout to /dev/null.  The idea
>     is to turn a noisy command into something more like a traditional
>     Unix utility, which never writes anything to stdout unless that's
>     its primary function.
> 
>   * "Speak softly": In other cases, like cvs, the -q switch reduces
>     chatter but leaves some informational messages alone.  In the cvs
>     case, per-directory messages go away but the file status messages
>     stay.

I think CVS uses -q and -Q for "speak softly" and "silence is golden"
respectively.  I'd be pleased if we supported the same.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Martin Pool <mb...@sourcefrog.net>.
On  1 Aug 2002, Scott Lamb <sl...@slamb.org> wrote:
> Greg Hudson wrote:
> >  * "Silence is golden": In some cases, like rsync or scp, the -q
> >    switch is equivalent to redirecting stdout to /dev/null.  The idea
> >    is to turn a noisy command into something more like a traditional
> >    Unix utility, which never writes anything to stdout unless that's
> >    its primary function.
> 
> I never understood the point of these - redirecting to /dev/null works 
> just as well and is standard across all software. Unless you print 
> errors on stdout, but that would be dumb.

I think the case is a program that produces "data" to stdout, and
"metadata" to stderr.  Perhaps by default it produces warnings to
stderr as well, but --silent will make it shut up unless something
horrible happens, in which case you do want something on stderr.

For example, gzip works this way.

I think it's quite nice and consistent.

-- 
Martin 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by Scott Lamb <sl...@slamb.org>.
Greg Hudson wrote:
>   * "Silence is golden": In some cases, like rsync or scp, the -q
>     switch is equivalent to redirecting stdout to /dev/null.  The idea
>     is to turn a noisy command into something more like a traditional
>     Unix utility, which never writes anything to stdout unless that's
>     its primary function.

I never understood the point of these - redirecting to /dev/null works 
just as well and is standard across all software. Unless you print 
errors on stdout, but that would be dumb.

>   * "Speak softly": In other cases, like cvs, the -q switch reduces
>     chatter but leaves some informational messages alone.  In the cvs
>     case, per-directory messages go away but the file status messages
>     stay.
 >
 > Since we don't have per-directory scanning messages in svn

That's why I use -q with cvs (and consider it necessary - otherwise, the 
update display is too noisy to be useful). Here, I don't see the same need.

So, I'm just not sure these options are worth worrying about. I don't 
think I'd use either one.

--
Scott Lamb


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Bikeshed: --quiet option

Posted by William Uther <wi...@cs.cmu.edu>.
On 1/8/02 8:57 AM, "Greg Hudson" <gh...@MIT.EDU> wrote:

> Now that I'm coming back to this, I'm a little unsure about what the
> right behavior is.  If we review how the -q option works in other
> commands, we see two different classes of behaviors:
> 
> * "Silence is golden": In some cases, like rsync or scp, the -q
>   switch is equivalent to redirecting stdout to /dev/null.  The idea
>   is to turn a noisy command into something more like a traditional
>   Unix utility, which never writes anything to stdout unless that's
>   its primary function.
> 
> * "Speak softly": In other cases, like cvs, the -q switch reduces
>   chatter but leaves some informational messages alone.  In the cvs
>   case, per-directory messages go away but the file status messages
>   stay.

There is a third option I've seen: Count the number of -q's to determine a
'silence' level.  You could make -q "speak softly", -q -q quiet except for
errors, and -q -q -q print nothing at all (errors detected by return
status).

Later,

\x/ill         :-}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org