summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-05-30 08:27:03 +0000
committerxsa <xsa@openbsd.org>2005-05-30 08:27:03 +0000
commit082a1aa7128a870e7172b00f471e525f6a1a6432 (patch)
treee2af84f159672e80ebcec6481d9f3e6446392c7d
parentzap an unused variable (diff)
downloadwireguard-openbsd-082a1aa7128a870e7172b00f471e525f6a1a6432.tar.xz
wireguard-openbsd-082a1aa7128a870e7172b00f471e525f6a1a6432.zip
-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@
-rw-r--r--usr.bin/cvs/annotate.c8
-rw-r--r--usr.bin/cvs/update.c14
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);
}