diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-06 20:39:28 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-06 20:39:28 +0000 |
commit | cb3718dfad10bdcbf8a70d42fb7e3a8a36452464 (patch) | |
tree | ece142265933d2d17d0db181610e748fb2309947 /usr.bin/cvs | |
parent | af4ca1856f9a1fadfaf72756bd88e75d6fff760e (diff) |
the status command now supports the same arguments as its gnu cvs
counterpart (-lRv)
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/cvs.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/status.c | 24 |
2 files changed, 21 insertions, 7 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index 3d4e971954e..b9b518872f2 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.30 2005/01/06 19:56:38 jfb Exp $ */ +/* $OpenBSD: cvs.c,v 1.31 2005/01/06 20:39:27 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -253,7 +253,7 @@ static struct cvs_cmd { }, { CVS_OP_STATUS, "status", { "st", "stat" }, cvs_status, - "", + "[-lRv]", "", "Display status information on checked out files", NULL, diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c index 6c31f2861b1..5cf616a7ac2 100644 --- a/usr.bin/cvs/status.c +++ b/usr.bin/cvs/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.6 2004/12/21 18:32:10 jfb Exp $ */ +/* $OpenBSD: status.c,v 1.7 2005/01/06 20:39:27 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -63,13 +63,23 @@ int cvs_status_file (CVSFILE *, void *); int cvs_status(int argc, char **argv) { - int i, ch, flags; + int i, ch, flags, verbose; struct cvsroot *root; + verbose = 0; flags = CF_SORT|CF_IGNORE|CF_RECURSE; - while ((ch = getopt(argc, argv, "F:flm:Rr:")) != -1) { + while ((ch = getopt(argc, argv, "lRv")) != -1) { switch (ch) { + case 'l': + flags &= ~CF_RECURSE; + break; + case 'R': + flags |= CF_RECURSE; + break; + case 'v': + verbose = 1; + break; default: return (EX_USAGE); } @@ -95,8 +105,12 @@ cvs_status(int argc, char **argv) return (EX_USAGE); } - if ((root->cr_method != CVS_METHOD_LOCAL) && (cvs_connect(root) < 0)) - return (EX_PROTOCOL); + if (root->cr_method != CVS_METHOD_LOCAL) { + if (cvs_connect(root) < 0) + return (EX_PROTOCOL); + if (verbose && (cvs_sendarg(root, "-v", 0) < 0)) + return (EX_PROTOCOL); + } cvs_file_examine(cvs_files, cvs_status_file, NULL); |