=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.177 retrieving revision 1.178 diff -c -r1.177 -r1.178 *** src/usr.bin/cvs/file.c 2007/01/26 11:19:44 1.177 --- src/usr.bin/cvs/file.c 2007/01/27 20:02:33 1.178 *************** *** 1,4 **** ! /* $OpenBSD: file.c,v 1.177 2007/01/26 11:19:44 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau --- 1,4 ---- ! /* $OpenBSD: file.c,v 1.178 2007/01/27 20:02:33 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau *************** *** 564,570 **** size_t len; struct stat st; BUF *b1, *b2; ! int rflags, l, ismodified, rcsdead, verbose; CVSENTRIES *entlist = NULL; const char *state; char repo[MAXPATHLEN], rcsfile[MAXPATHLEN], r1[16], r2[16]; --- 564,570 ---- size_t len; struct stat st; BUF *b1, *b2; ! int rflags, l, ismodified, rcsdead; CVSENTRIES *entlist = NULL; const char *state; char repo[MAXPATHLEN], rcsfile[MAXPATHLEN], r1[16], r2[16]; *************** *** 576,583 **** return; } - verbose = (verbosity > 1 && loud == 1); - cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN); l = snprintf(rcsfile, MAXPATHLEN, "%s/%s", repo, cf->file_name); --- 576,581 ---- *************** *** 716,730 **** if (cf->file_ent == NULL) { if (cf->file_rcs == NULL) { if (cf->fd == -1) { ! if (verbose) ! cvs_log(LP_NOTICE, ! "nothing known about '%s'", ! cf->file_path); ! } else { ! if (verbose) ! cvs_log(LP_NOTICE, ! "use add to create an entry for %s", ! cf->file_path); } cf->file_status = FILE_UNKNOWN; --- 714,726 ---- if (cf->file_ent == NULL) { if (cf->file_rcs == NULL) { if (cf->fd == -1) { ! cvs_log(LP_NOTICE, ! "nothing known about '%s'", ! cf->file_path); ! } else if (cvs_cmdop != CVS_OP_ADD) { ! cvs_log(LP_NOTICE, ! "use add to create an entry for %s", ! cf->file_path); } cf->file_status = FILE_UNKNOWN; *************** *** 732,741 **** if (cf->fd == -1) { cf->file_status = FILE_UPTODATE; } else { ! if (verbose) ! cvs_log(LP_NOTICE, ! "use add to create an entry for %s", ! cf->file_path); cf->file_status = FILE_UNKNOWN; } } else { --- 728,736 ---- if (cf->fd == -1) { cf->file_status = FILE_UPTODATE; } else { ! cvs_log(LP_NOTICE, ! "use add to create an entry for %s", ! cf->file_path); cf->file_status = FILE_UNKNOWN; } } else { *************** *** 743,778 **** } } else if (cf->file_ent->ce_status == CVS_ENT_ADDED) { if (cf->fd == -1) { ! if (verbose) cvs_log(LP_NOTICE, "warning: new-born %s has disappeared", cf->file_path); cf->file_status = FILE_REMOVE_ENTRY; } else if (cf->file_rcs == NULL || rcsdead == 1) { cf->file_status = FILE_ADDED; } else { ! if (verbose) ! cvs_log(LP_NOTICE, ! "conflict: %s already created by others", ! cf->file_path); cf->file_status = FILE_CONFLICT; } } else if (cf->file_ent->ce_status == CVS_ENT_REMOVED) { if (cf->fd != -1) { ! if (verbose) ! cvs_log(LP_NOTICE, ! "%s should be removed but is still there", ! cf->file_path); cf->file_status = FILE_REMOVED; } else if (cf->file_rcs == NULL || rcsdead == 1) { cf->file_status = FILE_REMOVE_ENTRY; } else { if (strcmp(r1, r2)) { ! if (verbose) ! cvs_log(LP_NOTICE, ! "conflict: removed %s was modified" ! " by a second party", ! cf->file_path); cf->file_status = FILE_CONFLICT; } else { cf->file_status = FILE_REMOVED; --- 738,771 ---- } } else if (cf->file_ent->ce_status == CVS_ENT_ADDED) { if (cf->fd == -1) { ! if (cvs_cmdop != CVS_OP_REMOVE) { cvs_log(LP_NOTICE, "warning: new-born %s has disappeared", cf->file_path); + } cf->file_status = FILE_REMOVE_ENTRY; } else if (cf->file_rcs == NULL || rcsdead == 1) { cf->file_status = FILE_ADDED; } else { ! cvs_log(LP_NOTICE, ! "conflict: %s already created by others", ! 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", ! cf->file_path); cf->file_status = FILE_REMOVED; } else if (cf->file_rcs == NULL || rcsdead == 1) { cf->file_status = FILE_REMOVE_ENTRY; } else { if (strcmp(r1, r2)) { ! cvs_log(LP_NOTICE, ! "conflict: removed %s was modified" ! " by a second party", ! cf->file_path); cf->file_status = FILE_CONFLICT; } else { cf->file_status = FILE_REMOVED; *************** *** 781,819 **** } else if (cf->file_ent->ce_status == CVS_ENT_REG) { if (cf->file_rcs == NULL || rcsdead == 1) { if (cf->fd == -1) { ! if (verbose) ! cvs_log(LP_NOTICE, ! "warning: %s's entry exists but" ! " there is no longer a file" ! " in the repository," ! " removing entry", ! cf->file_path); cf->file_status = FILE_REMOVE_ENTRY; } else { if (ismodified) { ! if (verbose) ! cvs_log(LP_NOTICE, ! "conflict: %s is no longer " ! "in the repository but is " ! "locally modified", ! cf->file_path); cf->file_status = FILE_CONFLICT; } else { ! if (verbose) ! cvs_log(LP_NOTICE, ! "%s is no longer in the " ! "repository", ! cf->file_path); cf->file_status = FILE_UNLINK; } } } else { if (cf->fd == -1) { ! if (verbose) cvs_log(LP_NOTICE, "warning: %s was lost", cf->file_path); cf->file_status = FILE_LOST; } else { if (ismodified == 1) --- 774,810 ---- } else if (cf->file_ent->ce_status == CVS_ENT_REG) { if (cf->file_rcs == NULL || rcsdead == 1) { if (cf->fd == -1) { ! cvs_log(LP_NOTICE, ! "warning: %s's entry exists but" ! " there is no longer a file" ! " in the repository," ! " removing entry", ! cf->file_path); cf->file_status = FILE_REMOVE_ENTRY; } else { if (ismodified) { ! cvs_log(LP_NOTICE, ! "conflict: %s is no longer " ! "in the repository but is " ! "locally modified", ! cf->file_path); cf->file_status = FILE_CONFLICT; } else { ! cvs_log(LP_NOTICE, ! "%s is no longer in the " ! "repository", ! cf->file_path); cf->file_status = FILE_UNLINK; } } } else { if (cf->fd == -1) { ! if (cvs_cmdop != CVS_OP_REMOVE) { cvs_log(LP_NOTICE, "warning: %s was lost", cf->file_path); + } cf->file_status = FILE_LOST; } else { if (ismodified == 1)