diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-04 21:29:18 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-04 21:29:18 +0000 |
commit | f384f36f596a32adb5cf27040e9739ee2549b8c0 (patch) | |
tree | 508d408c61c332d105748522c64dd3d3490e85e5 | |
parent | 1deec3aaeda776755b56b0c154246c207dcbccf7 (diff) |
implement -n for checkout:
"Do not execute programs listed in the CVSROOT/modules file."
ok tobias@, pleasekeepthingssortedktnx xsa@
-rw-r--r-- | usr.bin/cvs/checkout.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index 6bd12c87157..a4035f1420b 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.126 2008/02/04 19:08:32 joris Exp $ */ +/* $OpenBSD: checkout.c,v 1.127 2008/02/04 21:29:17 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -42,6 +42,8 @@ static int flags = CR_REPO | CR_RECURSE_DIRS; static char *dflag = NULL; static char *koptstr = NULL; +static int nflag = 0; + struct cvs_cmd cvs_cmd_checkout = { CVS_OP_CHECKOUT, CVS_USE_WDIR, "checkout", { "co", "get" }, @@ -92,6 +94,9 @@ cvs_checkout(int argc, char **argv) break; case 'N': break; + case 'n': + nflag = 1; + break; case 'P': prune_dirs = 1; break; @@ -99,6 +104,7 @@ cvs_checkout(int argc, char **argv) cmdp->cmd_flags &= ~CVS_USE_WDIR; print_stdout = 1; cvs_noexec = 1; + nflag = 1; break; case 'R': flags |= CR_RECURSE_DIRS; @@ -205,6 +211,9 @@ checkout_check_repository(int argc, char **argv) if (print_stdout == 1) cvs_client_send_request("Argument -p"); + if (nflag == 1) + cvs_client_send_request("Argument -n"); + cr.enterdir = NULL; cr.leavedir = NULL; if (print_stdout) @@ -288,7 +297,7 @@ checkout_check_repository(int argc, char **argv) break; } - if (mc->mc_prog != NULL && + if (nflag != 1 && mc->mc_prog != NULL && mc->mc_flags & MODULE_RUN_ON_COMMIT) cvs_exec(mc->mc_prog); } |