version 1.7, 2005/04/12 14:58:40 |
version 1.8, 2005/04/18 21:02:50 |
|
|
int ret; |
int ret; |
char fpath[MAXPATHLEN]; |
char fpath[MAXPATHLEN]; |
struct cvsroot *root; |
struct cvsroot *root; |
CVSENTRIES *entfile; |
|
struct cvs_ent *ent; |
|
|
|
ret = 0; |
ret = 0; |
ent = NULL; |
|
root = CVS_DIR_ROOT(cf); |
root = CVS_DIR_ROOT(cf); |
|
|
if (cf->cf_type == DT_DIR) { |
if (cf->cf_type == DT_DIR) { |
|
|
|
|
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
cvs_file_getpath(cf, fpath, sizeof(fpath)); |
|
|
entfile = cvs_ent_open(dirname(fpath), O_RDWR); |
|
if (entfile == NULL) { |
|
cvs_log(LP_ERR, "failed to remove `%s'", fpath); |
|
return (CVS_EX_FILE); |
|
} |
|
|
|
ent = cvs_ent_get(entfile, CVS_FILE_NAME(cf)); |
|
|
|
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (ent != NULL) |
ret = cvs_sendentry(root, cf); |
ret = cvs_sendentry(root, ent); |
|
} else { |
} 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) { |
|
|
"use `%s commit' to remove this file permanently", |
"use `%s commit' to remove this file permanently", |
__progname); |
__progname); |
} |
} |
|
|
cvs_ent_close(entfile); |
|
|
|
return (ret); |
return (ret); |
} |
} |