version 1.54, 2006/06/19 05:05:17 |
version 1.55, 2006/10/31 15:23:40 |
|
|
|
|
#include "cvs.h" |
#include "cvs.h" |
#include "log.h" |
#include "log.h" |
|
#include "remote.h" |
|
|
extern char *__progname; |
extern char *__progname; |
|
|
int cvs_remove(int, char **); |
|
void cvs_remove_local(struct cvs_file *); |
void cvs_remove_local(struct cvs_file *); |
|
|
static int force_remove = 0; |
static int force_remove = 0; |
|
|
|
|
cr.enterdir = NULL; |
cr.enterdir = NULL; |
cr.leavedir = NULL; |
cr.leavedir = NULL; |
cr.fileproc = cvs_remove_local; |
|
|
if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { |
|
cr.fileproc = cvs_client_sendfile; |
|
|
|
if (force_remove == 1) |
|
cvs_client_send_request("Argument -f"); |
|
|
|
if (!(flags & CR_RECURSE_DIRS)) |
|
cvs_client_send_request("Argument -l"); |
|
} else { |
|
cr.fileproc = cvs_remove_local; |
|
} |
|
|
cr.flags = flags; |
cr.flags = flags; |
|
|
if (argc > 0) |
if (argc > 0) |
|
|
else |
else |
cvs_file_run(1, &arg, &cr); |
cvs_file_run(1, &arg, &cr); |
|
|
if (existing != 0) { |
if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { |
cvs_log(LP_ERR, "%d file(s) exist, remove them first", |
cvs_client_send_files(argv, argc); |
existing); |
cvs_client_senddir("."); |
} |
cvs_client_send_request("remove"); |
|
cvs_client_get_responses(); |
|
} else { |
|
if (existing != 0) { |
|
cvs_log(LP_ERR, "%d file(s) exist, remove them first", |
|
existing); |
|
} |
|
|
if (removed != 0) { |
if (removed != 0) { |
if (verbosity > 1) |
if (verbosity > 1) { |
cvs_log(LP_NOTICE, "use '%s commit' to remove %s " |
cvs_log(LP_NOTICE, |
"permanently", __progname, (removed > 1) ? |
"use '%s commit' to remove %s " |
"these files" : "this file"); |
"permanently", __progname, (removed > 1) ? |
|
"these files" : "this file"); |
|
} |
|
} |
} |
} |
|
|
return (0); |
return (0); |