summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-05-20 18:26:50 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-05-20 18:26:50 +0000
commit6d6ba437544c3dd4dce421dbabbb9b3b5662cbef (patch)
treeb606c29e2122df9199d427cefbf06496c761715c
parent59e38454dfc5679329512dafd063ac43760c9ecd (diff)
first bits of the `cvs -n' option; ok jfb joris
-rw-r--r--usr.bin/cvs/checkout.c5
-rw-r--r--usr.bin/cvs/cvs.c6
-rw-r--r--usr.bin/cvs/cvs.h3
-rw-r--r--usr.bin/cvs/update.c4
4 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index dbb7404e761..b42c1ccd495 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.19 2005/05/20 05:13:44 joris Exp $ */
+/* $OpenBSD: checkout.c,v 1.20 2005/05/20 18:26:49 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -92,6 +92,9 @@ cvs_checkout_options(char *opt, int argc, char **argv, int *arg)
return (CVS_EX_USAGE);
}
break;
+ case 'p':
+ cvs_noexec = 1; /* no locks will be created */
+ break;
case 'r':
rev = optarg;
break;
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index 2c81f1e56d9..5bbc664c539 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.64 2005/05/19 15:37:50 xsa Exp $ */
+/* $OpenBSD: cvs.c,v 1.65 2005/05/20 18:26:49 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -56,6 +56,7 @@ int cvs_trace = 0;
int cvs_nolog = 0;
int cvs_readonly = 0;
int cvs_nocase = 0; /* set to 1 to disable filename case sensitivity */
+int cvs_noexec = 0; /* set to 1 to disable disk operations (-n option) */
char *cvs_defargs; /* default global arguments from .cvsrc */
char *cvs_command; /* name of the command we are running */
@@ -110,7 +111,7 @@ struct cvs_cmd cvs_cdt[] = {
CVS_OP_CHECKOUT, "checkout", { "co", "get" }, &cvs_checkout,
"[-AcflNnPpRs] [-D date | -r rev] [-d dir] [-j rev] [-k mode] "
"[-t id] module ...",
- "AcD:d:fj:k:lNnPRr:st:",
+ "AcD:d:fj:k:lNnPpRr:st:",
"Checkout sources for editing",
NULL
},
@@ -487,6 +488,7 @@ cvs_getopt(int argc, char **argv)
cvs_nolog = 1;
break;
case 'n':
+ cvs_noexec = 1;
break;
case 'Q':
verbosity = 0;
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h
index adc18318197..6955ccdbc51 100644
--- a/usr.bin/cvs/cvs.h
+++ b/usr.bin/cvs/cvs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.h,v 1.56 2005/05/19 04:17:24 jfb Exp $ */
+/* $OpenBSD: cvs.h,v 1.57 2005/05/20 18:26:49 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -317,6 +317,7 @@ extern int cvs_nolog;
extern int cvs_compress;
extern int cvs_cmdop;
extern int cvs_nocase;
+extern int cvs_noexec;
extern int cvs_readonly;
extern CVSFILE *cvs_files;
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 344b325f019..cb66036c97e 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.26 2005/04/27 04:42:40 jfb Exp $ */
+/* $OpenBSD: update.c,v 1.27 2005/05/20 18:26:49 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -83,6 +83,8 @@ cvs_update_options(char *opt, int argc, char **argv, int *arg)
Pflag = 1;
break;
case 'p':
+ cvs_noexec = 1; /* no locks will be created */
+ break;
case 'Q':
case 'q':
break;