summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-07 19:18:42 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-07 19:18:42 +0000
commit7dda6db762260dcb35a8e429f55ccfdcb5d6ef6c (patch)
treeb5ee1a3682aadbd9f2f8ea52d4cd362458686d56
parent1501f4d3fac58f24d1433ba403a8876c330d1347 (diff)
Do not use global option -V (GNU cvs doesn't understand it), be very
verbose per default on server-side instead. OK joris@
-rw-r--r--usr.bin/cvs/client.c19
-rw-r--r--usr.bin/cvs/server.c11
2 files changed, 18 insertions, 12 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index d5bd731fd62..0bfcfbdbd46 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.75 2007/09/02 12:16:24 tobias Exp $ */
+/* $OpenBSD: client.c,v 1.76 2007/09/07 19:18:41 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -279,11 +279,17 @@ cvs_client_connect_to_server(void)
if (cvs_noexec == 1)
cvs_client_send_request("Global_option -n");
- if (verbosity == 0)
+ switch (verbosity) {
+ case 0:
cvs_client_send_request("Global_option -Q");
-
- /* Be quiet. This is the default in OpenCVS. */
- cvs_client_send_request("Global_option -q");
+ break;
+ case 1:
+ /* Be quiet. This is the default in OpenCVS. */
+ cvs_client_send_request("Global_option -q");
+ break;
+ default:
+ break;
+ }
if (cvs_readonly == 1)
cvs_client_send_request("Global_option -r");
@@ -291,9 +297,6 @@ cvs_client_connect_to_server(void)
if (cvs_trace == 1)
cvs_client_send_request("Global_option -t");
- if (verbosity == 2)
- cvs_client_send_request("Global_option -V");
-
/* XXX: If 'Set' is supported? */
TAILQ_FOREACH(vp, &cvs_variables, cv_link)
cvs_client_send_request("Set %s=%s", vp->cv_name, vp->cv_val);
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index 712db2e1689..0d856057d07 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.69 2007/09/02 12:16:24 tobias Exp $ */
+/* $OpenBSD: server.c,v 1.70 2007/09/07 19:18:41 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -93,6 +93,9 @@ cvs_server(int argc, char **argv)
if (argc > 1)
fatal("server does not take any extra arguments");
+ /* Be on server-side very verbose per default. */
+ verbosity = 2;
+
setvbuf(stdin, NULL, _IOLBF, 0);
setvbuf(stdout, NULL, _IOLBF, 0);
@@ -278,14 +281,14 @@ cvs_server_globalopt(char *data)
if (!strcmp(data, "-Q"))
verbosity = 0;
+ if (!strcmp(data, "-q"))
+ verbosity = 1;
+
if (!strcmp(data, "-r"))
cvs_readonly = 1;
if (!strcmp(data, "-t"))
cvs_trace = 1;
-
- if (!strcmp(data, "-V"))
- verbosity = 2;
}
void