=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.207 retrieving revision 1.208 diff -c -r1.207 -r1.208 *** src/usr.bin/cvs/file.c 2008/01/10 10:09:27 1.207 --- src/usr.bin/cvs/file.c 2008/01/10 10:12:09 1.208 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.207 2008/01/10 10:09:27 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.208 2008/01/10 10:12:09 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau *************** *** 600,605 **** --- 600,606 ---- cf->file_rpath = xstrdup(rcsfile); entlist = cvs_ent_open(cf->file_wd); cf->file_ent = cvs_ent_get(entlist, cf->file_name); + cvs_ent_close(entlist, ENT_NOSYNC); if (cf->file_ent != NULL) { if (cf->file_ent->ce_type == CVS_ENT_DIR && *************** *** 623,629 **** else cf->file_status = FILE_UNKNOWN; - cvs_ent_close(entlist, ENT_NOSYNC); return; } --- 624,629 ---- *************** *** 637,642 **** --- 637,644 ---- case CVS_OP_RLOG: rflags |= RCS_PARSE_FULLY; break; + default: + break; } cf->repo_fd = open(cf->file_rpath, O_RDONLY); *************** *** 765,771 **** } else { cf->file_status = FILE_UPTODATE; } ! } else if (cf->file_ent->ce_status == CVS_ENT_ADDED) { if (cf->fd == -1) { if (cvs_cmdop != CVS_OP_REMOVE) { cvs_log(LP_NOTICE, --- 767,778 ---- } else { cf->file_status = FILE_UPTODATE; } ! ! return; ! } ! ! switch (cf->file_ent->ce_status) { ! case CVS_ENT_ADDED: if (cf->fd == -1) { if (cvs_cmdop != CVS_OP_REMOVE) { cvs_log(LP_NOTICE, *************** *** 781,787 **** cf->file_path); cf->file_status = FILE_CONFLICT; } ! } else if (cf->file_ent->ce_status == CVS_ENT_REMOVED) { if (cf->fd != -1) { cvs_log(LP_NOTICE, "%s should be removed but is still there", --- 788,795 ---- cf->file_path); cf->file_status = FILE_CONFLICT; } ! break; ! case CVS_ENT_REMOVED: if (cf->fd != -1) { cvs_log(LP_NOTICE, "%s should be removed but is still there", *************** *** 800,806 **** cf->file_status = FILE_REMOVED; } } ! } else if (cf->file_ent->ce_status == CVS_ENT_REG) { if (cf->file_rcs == NULL || rcsdead == 1 || (reset_stickies == 1 && cf->in_attic == 1) || (notag == 1 && tag != NULL)) { --- 808,815 ---- cf->file_status = FILE_REMOVED; } } ! break; ! case CVS_ENT_REG: if (cf->file_rcs == NULL || rcsdead == 1 || (reset_stickies == 1 && cf->in_attic == 1) || (notag == 1 && tag != NULL)) { *************** *** 851,859 **** } } } } - - cvs_ent_close(entlist, ENT_NOSYNC); } void --- 860,869 ---- } } } + break; + default: + break; } } void