version 1.9, 2005/04/19 15:36:39 |
version 1.10, 2005/04/21 18:54:50 |
|
|
NULL, |
NULL, |
cvs_remove_file, |
cvs_remove_file, |
NULL, NULL, |
NULL, NULL, |
0, |
CF_IGNORE | CF_RECURSE, |
CVS_REQ_REMOVE, |
CVS_REQ_REMOVE, |
CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC |
CVS_CMD_SENDDIR | CVS_CMD_SENDARGS2 | CVS_CMD_ALLOWSPEC |
}; |
}; |
|
|
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
|
|
if (root->cr_method != CVS_METHOD_LOCAL) { |
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 -f option is used, physically remove the file */ |
if (force_remove == 1) { |
if (force_remove == 1) { |
if((unlink(fpath) == -1) && (errno != ENOENT)) { |
if((unlink(fpath) == -1) && (errno != ENOENT)) { |
cvs_log(LP_ERRNO, "failed to unlink `%s'", |
cvs_log(LP_ERRNO, |
fpath); |
"failed to unlink `%s'", fpath); |
return (CVS_EX_FILE); |
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_log(LP_INFO, "scheduling file `%s' for removal", |
CVS_FILE_NAME(cf)); |
CVS_FILE_NAME(cf)); |
cvs_log(LP_INFO, |
cvs_log(LP_INFO, |