summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/server.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-12 07:16:15 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-12 07:16:15 +0000
commitff05b352e851c0121dd005f16aee6d1a36088df7 (patch)
treefd53b93d52a75aa4bf4f88da4de96e8355ecec8e /usr.bin/cvs/server.c
parent750260e3bf10f2e3e7853d979f57c79e3d35d6f8 (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/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");
}