=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/client.c,v retrieving revision 1.89 retrieving revision 1.90 diff -c -r1.89 -r1.90 *** src/usr.bin/cvs/client.c 2008/01/10 11:20:29 1.89 --- src/usr.bin/cvs/client.c 2008/01/21 16:36:46 1.90 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.89 2008/01/10 11:20:29 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.90 2008/01/21 16:36:46 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * *************** *** 96,102 **** { "import", 0, cvs_server_import, REQ_NEEDDIR }, { "admin", 0, cvs_server_admin, REQ_NEEDDIR }, ! { "export", 0, NULL, 0 }, { "history", 0, NULL, 0 }, { "release", 0, cvs_server_release, REQ_NEEDDIR }, --- 96,103 ---- { "import", 0, cvs_server_import, REQ_NEEDDIR }, { "admin", 0, cvs_server_admin, REQ_NEEDDIR }, ! { "export", 0, cvs_server_export, ! REQ_NEEDDIR }, { "history", 0, NULL, 0 }, { "release", 0, cvs_server_release, REQ_NEEDDIR }, *************** *** 169,174 **** --- 170,178 ---- cvs_mkpath(data, NULL); + if (cvs_cmdop == CVS_OP_EXPORT) + return; + if ((base = basename(data)) == NULL) fatal("client_check_directory: overflow"); *************** *** 714,723 **** e->ce_opts ? e->ce_opts : "", sticky); cvs_ent_free(e); - ent = cvs_ent_open(wdir); - cvs_ent_add(ent, entry); - cvs_ent_close(ent, ENT_SYNC); if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1) fatal("cvs_client_updated: open: %s: %s", fpath, strerror(errno)); --- 718,730 ---- e->ce_opts ? e->ce_opts : "", sticky); cvs_ent_free(e); + if (cvs_cmdop != CVS_OP_EXPORT) { + ent = cvs_ent_open(wdir); + cvs_ent_add(ent, entry); + cvs_ent_close(ent, ENT_SYNC); + } + if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1) fatal("cvs_client_updated: open: %s: %s", fpath, strerror(errno)); *************** *** 864,872 **** FILE *fp; char *dir, fpath[MAXPATHLEN]; - if (cvs_cmdop == CVS_OP_EXPORT) - return; - if (data == NULL) fatal("Missing argument for Set-static-directory"); --- 871,876 ---- *************** *** 875,880 **** --- 879,887 ---- dir = cvs_remote_input(); xfree(dir); + if (cvs_cmdop == CVS_OP_EXPORT) + return; + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", data, CVS_PATH_STATICENTRIES); *************** *** 890,898 **** { char *dir, fpath[MAXPATHLEN]; - if (cvs_cmdop == CVS_OP_EXPORT) - return; - if (data == NULL) fatal("Missing argument for Clear-static-directory"); --- 897,902 ---- *************** *** 901,906 **** --- 905,913 ---- dir = cvs_remote_input(); xfree(dir); + if (cvs_cmdop == CVS_OP_EXPORT) + return; + (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s", data, CVS_PATH_STATICENTRIES); *************** *** 913,921 **** FILE *fp; char *dir, *tag, tagpath[MAXPATHLEN]; - if (cvs_cmdop == CVS_OP_EXPORT) - return; - if (data == NULL) fatal("Missing argument for Set-sticky"); --- 920,925 ---- *************** *** 925,930 **** --- 929,937 ---- xfree(dir); tag = cvs_remote_input(); + if (cvs_cmdop == CVS_OP_EXPORT) + goto out; + client_check_directory(data); (void)xsnprintf(tagpath, MAXPATHLEN, "%s/%s", data, CVS_PATH_TAG); *************** *** 945,953 **** { char *dir, tagpath[MAXPATHLEN]; - if (cvs_cmdop == CVS_OP_EXPORT) - return; - if (data == NULL) fatal("Missing argument for Clear-sticky"); --- 952,957 ---- *************** *** 955,960 **** --- 959,967 ---- dir = cvs_remote_input(); xfree(dir); + + if (cvs_cmdop == CVS_OP_EXPORT) + return; client_check_directory(data);