=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/remove.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/cvs/remove.c 2005/04/19 15:36:39 1.9 --- src/usr.bin/cvs/remove.c 2005/04/21 18:54:50 1.10 *************** *** 1,4 **** ! /* $OpenBSD: remove.c,v 1.9 2005/04/19 15:36:39 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2004 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: remove.c,v 1.10 2005/04/21 18:54:50 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2004 Xavier Santolaria *************** *** 52,58 **** NULL, cvs_remove_file, NULL, NULL, ! 0, CVS_REQ_REMOVE, CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC }; --- 52,58 ---- NULL, cvs_remove_file, NULL, NULL, ! CF_IGNORE | CF_RECURSE, CVS_REQ_REMOVE, CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC }; *************** *** 114,133 **** cvs_file_getpath(cf, fpath, sizeof(fpath)); if (root->cr_method != CVS_METHOD_LOCAL) { - if (cvs_sendentry(root, cf) < 0) { - return (CVS_EX_PROTO); - } - - } else { /* if -f option is used, physically remove the file */ if (force_remove == 1) { if((unlink(fpath) == -1) && (errno != ENOENT)) { ! cvs_log(LP_ERRNO, "failed to unlink `%s'", ! fpath); return (CVS_EX_FILE); } } cvs_log(LP_INFO, "scheduling file `%s' for removal", CVS_FILE_NAME(cf)); cvs_log(LP_INFO, --- 114,141 ---- cvs_file_getpath(cf, fpath, sizeof(fpath)); if (root->cr_method != CVS_METHOD_LOCAL) { /* if -f option is used, physically remove the file */ if (force_remove == 1) { if((unlink(fpath) == -1) && (errno != ENOENT)) { ! cvs_log(LP_ERRNO, ! "failed to unlink `%s'", fpath); return (CVS_EX_FILE); } } + if (cvs_sendentry(root, cf) < 0) + return (CVS_EX_PROTO); + + if (cf->cf_cvstat != CVS_FST_LOST && force_remove != 1) { + if (cvs_sendreq(root, CVS_REQ_MODIFIED, + CVS_FILE_NAME(cf)) < 0) { + return (CVS_EX_PROTO); + } + } + + if (cvs_sendfile(root, fpath) < 0) + return (CVS_EX_PROTO); + } else { cvs_log(LP_INFO, "scheduling file `%s' for removal", CVS_FILE_NAME(cf)); cvs_log(LP_INFO,