diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-06-12 07:16:15 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-06-12 07:16:15 +0000 |
commit | ff05b352e851c0121dd005f16aee6d1a36088df7 (patch) | |
tree | fd53b93d52a75aa4bf4f88da4de96e8355ecec8e /usr.bin/cvs/util.c | |
parent | 750260e3bf10f2e3e7853d979f57c79e3d35d6f8 (diff) |
completely kill the need for TMP_DIR when running checkout,
which gives us better performance among other things.
this is however disabled in a few cases:
1) whenever you run checkout over an existing tree (which acts as update)
2) whenever you specify -d or a module alias
we're planning on enabling this behaviour for case 2 in the future.
anoncvs sysadmins now love us even more.
ok tobias@
Diffstat (limited to 'usr.bin/cvs/util.c')
-rw-r--r-- | usr.bin/cvs/util.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index b4d53024732..8b158889be0 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.144 2008/06/10 01:00:35 joris Exp $ */ +/* $OpenBSD: util.c,v 1.145 2008/06/12 07:16:14 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -44,6 +44,7 @@ extern int print_stdout; extern int build_dirs; +extern int disable_fast_checkout; /* letter -> mode type map */ static const int cvs_modetypes[26] = { @@ -364,7 +365,7 @@ cvs_unlink(const char *path) if (cvs_server_active == 0) cvs_log(LP_TRACE, "cvs_unlink(%s)", path); - if (cvs_noexec == 1) + if (cvs_noexec == 1 && disable_fast_checkout != 0) return (0); if (unlink(path) == -1 && errno != ENOENT) { @@ -393,7 +394,7 @@ cvs_rmdir(const char *path) if (cvs_server_active == 0) cvs_log(LP_TRACE, "cvs_rmdir(%s)", path); - if (cvs_noexec == 1) + if (cvs_noexec == 1 && disable_fast_checkout != 0) return (0); if ((dirp = opendir(path)) == NULL) { @@ -857,7 +858,7 @@ cvs_yesno(void) * else, 0 or -1 if an error occur. */ int -cvs_exec(const char *prog, const char *in, int needwait) +cvs_exec(char *prog, const char *in, int needwait) { pid_t pid; int fds[2], size, st; |