diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-28 20:19:06 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-28 20:19:06 +0000 |
commit | 4eb8ea158de546c64fec2d8a12116cb2019c0ddd (patch) | |
tree | 33c6ee58937977db102d80b66742854a49ccd430 | |
parent | f0b063e8d8b04d53ad8992c5881ea5c46fe2d99b (diff) |
use quiet mode (-q) by default and add a flag -V for the old "verbose"
mode. if you really need to know all the details (the old GNU'ish
behaviour), use -V or even -t for tracing.
ok joris@
-rw-r--r-- | usr.bin/cvs/cvs.1 | 8 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.c | 19 |
2 files changed, 18 insertions, 9 deletions
diff --git a/usr.bin/cvs/cvs.1 b/usr.bin/cvs/cvs.1 index 71c0480358c..2e7dc2afee9 100644 --- a/usr.bin/cvs/cvs.1 +++ b/usr.bin/cvs/cvs.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cvs.1,v 1.98 2006/06/04 20:19:17 xsa Exp $ +.\" $OpenBSD: cvs.1,v 1.99 2006/06/28 20:19:05 reyk Exp $ .\" .\" Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> .\" Copyright (c) 2004-2006 Xavier Santolaria <xsa@openbsd.org> @@ -33,7 +33,7 @@ .Sh SYNOPSIS .Nm .Bk -words -.Op Fl flnQqrtvw +.Op Fl flnQqrtvVw .Op Fl d Ar root .Op Fl e Ar editor .Xo @@ -103,6 +103,7 @@ Be extra quiet. Only error messages will be displayed. .It Fl q Be quiet about reporting. +This is the default. .It Fl r Extract files in read-only mode. .It Fl s Ar var Ns = Ns Ar val @@ -116,6 +117,9 @@ The default is set to .Pa /tmp . .It Fl t Trace program execution. +.It Fl V +Verbose mode. +All messages will be displayed. .It Fl v Display version information and exit. .It Fl w diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index 9acb7d7dc4f..32ccbfb3e94 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.104 2006/06/13 06:53:45 joris Exp $ */ +/* $OpenBSD: cvs.c,v 1.105 2006/06/28 20:19:05 reyk Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -35,7 +35,7 @@ extern char *__progname; /* verbosity level: 0 = really quiet, 1 = quiet, 2 = verbose */ -int verbosity = 2; +int verbosity = 1; /* compression level used with zlib, 0 meaning no compression taking place */ int cvs_compress = 0; @@ -102,7 +102,7 @@ void usage(void) { fprintf(stderr, - "Usage: %s [-flnQqrtvw] [-d root] [-e editor] [-s var=val] " + "Usage: %s [-flnQqrtvVw] [-d root] [-e editor] [-s var=val] " "[-T tmpdir] [-z level] command [...]\n", __progname); } @@ -258,7 +258,7 @@ cvs_getopt(int argc, char **argv) int ret; char *ep; - while ((ret = getopt(argc, argv, "b:d:e:fHlnQqrs:T:tvwz:")) != -1) { + while ((ret = getopt(argc, argv, "b:d:e:fHlnQqrs:T:tvVwz:")) != -1) { switch (ret) { case 'b': /* @@ -287,9 +287,9 @@ cvs_getopt(int argc, char **argv) verbosity = 0; break; case 'q': - /* don't override -Q */ - if (verbosity > 1) - verbosity = 1; + /* + * Be quiet. This is the default in OpenCVS. + */ break; case 'r': cvs_readonly = 1; @@ -310,6 +310,11 @@ cvs_getopt(int argc, char **argv) case 't': cvs_trace = 1; break; + case 'V': + /* don't override -Q */ + if (verbosity) + verbosity = 2; + break; case 'v': printf("%s\n", CVS_VERSION); exit(0); |