version 1.197, 2007/09/17 10:07:21 |
version 1.198, 2007/09/22 15:57:24 |
|
|
|
|
#include "atomicio.h" |
#include "atomicio.h" |
#include "cvs.h" |
#include "cvs.h" |
|
#include "remote.h" |
|
|
#define CVS_IGN_STATIC 0x01 /* pattern is static, no need to glob */ |
#define CVS_IGN_STATIC 0x01 /* pattern is static, no need to glob */ |
|
|
|
|
size_t len; |
size_t len; |
struct stat st; |
struct stat st; |
BUF *b1, *b2; |
BUF *b1, *b2; |
|
int server_has_file; |
int rflags, ismodified, rcsdead; |
int rflags, ismodified, rcsdead; |
CVSENTRIES *entlist = NULL; |
CVSENTRIES *entlist = NULL; |
const char *state; |
const char *state; |
char repo[MAXPATHLEN], rcsfile[MAXPATHLEN]; |
char repo[MAXPATHLEN], rcsfile[MAXPATHLEN]; |
char r1[CVS_REV_BUFSZ], r2[CVS_REV_BUFSZ]; |
char r1[CVS_REV_BUFSZ], r2[CVS_REV_BUFSZ]; |
|
|
cvs_log(LP_TRACE, "cvs_file_classify(%s)", cf->file_path); |
cvs_log(LP_TRACE, "cvs_file_classify(%s, %s)", cf->file_path, |
|
(tag != NULL) ? tag : "none"); |
|
|
if (!strcmp(cf->file_path, ".")) { |
if (!strcmp(cf->file_path, ".")) { |
cf->file_status = FILE_UPTODATE; |
cf->file_status = FILE_UPTODATE; |
|
|
ismodified = 1; |
ismodified = 1; |
} |
} |
|
|
|
server_has_file = 0; |
|
if (cvs_server_active == 1 && cf->file_ent != NULL && |
|
cf->file_ent->ce_mtime == CVS_SERVER_UPTODATE) { |
|
server_has_file = 1; |
|
ismodified = 0; |
|
} |
|
|
if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL) { |
if (ismodified == 1 && cf->fd != -1 && cf->file_rcs != NULL) { |
b1 = rcs_rev_getbuf(cf->file_rcs, cf->file_rcsrev, 0); |
b1 = rcs_rev_getbuf(cf->file_rcs, cf->file_rcsrev, 0); |
if (b1 == NULL) |
if (b1 == NULL) |
|
|
} else if (cf->file_ent->ce_status == CVS_ENT_REG) { |
} else if (cf->file_ent->ce_status == CVS_ENT_REG) { |
if (cf->file_rcs == NULL || rcsdead == 1 || |
if (cf->file_rcs == NULL || rcsdead == 1 || |
(reset_stickies == 1 && cf->in_attic == 1)) { |
(reset_stickies == 1 && cf->in_attic == 1)) { |
if (cf->fd == -1) { |
if (cf->fd == -1 && server_has_file == 0) { |
cvs_log(LP_NOTICE, |
cvs_log(LP_NOTICE, |
"warning: %s's entry exists but" |
"warning: %s's entry exists but" |
" there is no longer a file" |
" there is no longer a file" |
|
|
} |
} |
} |
} |
} else { |
} else { |
if (cf->fd == -1) { |
if (cf->fd == -1 && server_has_file == 0) { |
if (cvs_cmdop != CVS_OP_REMOVE) { |
if (cvs_cmdop != CVS_OP_REMOVE) { |
cvs_log(LP_NOTICE, |
cvs_log(LP_NOTICE, |
"warning: %s was lost", |
"warning: %s was lost", |