diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-05-30 08:27:04 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-05-30 08:27:04 +0000 |
commit | 92843212cbcfdf87f82db44be609b3d04407f62d (patch) | |
tree | 27c492ada60d686a5c95e2aa760d9b0e501dae20 /usr.bin/cvs | |
parent | a2904f8d80e89491ca3d8bda5524059e99bab800 (diff) |
-D and -r can be used simultaneously, pointed out by marc@ and thus
backout my previous change + spotted another case in the annotate
command...
ok joris@
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/annotate.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/update.c | 14 |
2 files changed, 8 insertions, 14 deletions
diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index 971c81287b7..a349a196404 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.15 2005/05/29 00:52:08 xsa Exp $ */ +/* $OpenBSD: annotate.c,v 1.16 2005/05/30 08:27:03 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -96,12 +96,6 @@ cvs_annotate_options(struct cvs_cmd *cmd, int argc, char **argv, int *arg) } } - if ((date != NULL) && (rev != NULL)) { - cvs_log(LP_ERR, - "the -D and -r arguments are mutually exclusive"); - return (CVS_EX_USAGE); - } - *arg = optind; return (0); } diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 8c585ebd321..9c1dd035d4d 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.32 2005/05/29 16:36:54 xsa Exp $ */ +/* $OpenBSD: update.c,v 1.33 2005/05/30 08:27:03 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -113,12 +113,6 @@ cvs_update_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg) } } - if ((date != NULL) && (rev != NULL)) { - cvs_log(LP_ERR, - "the -D and -r arguments are mutually exclusive"); - return (CVS_EX_USAGE); - } - *arg = optind; return (0); } @@ -133,6 +127,12 @@ cvs_update_pre_exec(struct cvsroot *root) return (CVS_EX_PROTO); if (dflag && cvs_sendarg(root, "-d", 0) < 0) return (CVS_EX_PROTO); + + if (rev != NULL) { + if ((cvs_sendarg(root, "-r", 0) < 0) || + (cvs_sendarg(root, rev, 0) < 0)) + return (CVS_EX_PROTO); + } return (0); } |