summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/server.c
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2008-06-12 07:16:14 +0000
committerjoris <joris@openbsd.org>2008-06-12 07:16:14 +0000
commit1b5598b0a90de485ec9ab0224ee50b4ff9a09a17 (patch)
treea5eb3f4974936ae4cdaea06a3c8387066192a1c9 /usr.bin/cvs/server.c
parentBring biomem diff back into the tree after the nfs_bio.c fix went in. (diff)
downloadwireguard-openbsd-1b5598b0a90de485ec9ab0224ee50b4ff9a09a17.tar.xz
wireguard-openbsd-1b5598b0a90de485ec9ab0224ee50b4ff9a09a17.zip
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/server.c')
-rw-r--r--usr.bin/cvs/server.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index f757c28c36f..e61ec3a49c5 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.89 2008/06/10 05:01:36 tobias Exp $ */
+/* $OpenBSD: server.c,v 1.90 2008/06/12 07:16:14 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -75,6 +75,8 @@ static char *server_currentdir = NULL;
static char **server_argv;
static int server_argc = 1;
+extern int disable_fast_checkout;
+
struct cvs_cmd cvs_cmd_server = {
CVS_OP_SERVER, CVS_USE_WDIR, "server", { "", "" },
"server mode",
@@ -395,6 +397,9 @@ cvs_server_modified(char *data)
if (data == NULL)
fatal("Missing argument for Modified");
+ /* sorry, we have to use TMP_DIR */
+ disable_fast_checkout = 1;
+
mode = cvs_remote_input();
len = cvs_remote_input();
@@ -436,6 +441,9 @@ cvs_server_unchanged(char *data)
if (data == NULL)
fatal("Missing argument for Unchanged");
+ /* sorry, we have to use TMP_DIR */
+ disable_fast_checkout = 1;
+
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", server_currentdir, data);
entlist = cvs_ent_open(server_currentdir);
@@ -460,6 +468,8 @@ cvs_server_unchanged(char *data)
void
cvs_server_questionable(char *data)
{
+ /* sorry, we have to use TMP_DIR */
+ disable_fast_checkout = 1;
}
void
@@ -619,7 +629,7 @@ cvs_server_export(char *data)
cvs_cmdop = CVS_OP_EXPORT;
cmdp->cmd_flags = cvs_cmd_export.cmd_flags;
- cvs_checkout(server_argc, server_argv);
+ cvs_export(server_argc, server_argv);
cvs_server_send_response("ok");
}