From 1d2bf3c06fb24ab6e3c6d60346f8d9e6359384fc Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Thu, 18 Jan 2007 16:45:53 +0000 Subject: import improvements: - add support for remote import in opencvs client and server. - do not free already free'd buffers in import_update() - do not append a '\0' to the loaded file buffer, this was bad behaviour makes import work fine both locally and remotely. --- usr.bin/cvs/server.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs/server.c') diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index c27ebd77527..70ef3f0a398 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.49 2007/01/17 17:54:50 joris Exp $ */ +/* $OpenBSD: server.c,v 1.50 2007/01/18 16:45:52 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -481,6 +481,17 @@ cvs_server_add(char *data) cvs_server_send_response("ok"); } +void +cvs_server_import(char *data) +{ + if (chdir(server_currentdir) == -1) + fatal("cvs_server_import: %s", strerror(errno)); + + cvs_cmdop = CVS_OP_IMPORT; + cvs_import(server_argc, server_argv); + cvs_server_send_response("ok"); +} + void cvs_server_admin(char *data) { -- cgit v1.2.3