=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/add.c,v retrieving revision 1.107 retrieving revision 1.108 diff -c -r1.107 -r1.108 *** src/usr.bin/cvs/add.c 2009/02/21 14:50:53 1.107 --- src/usr.bin/cvs/add.c 2010/04/04 17:11:11 1.108 *************** *** 1,4 **** ! /* $OpenBSD: add.c,v 1.107 2009/02/21 14:50:53 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2005, 2006 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: add.c,v 1.108 2010/04/04 17:11:11 zinovik Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2005, 2006 Xavier Santolaria *************** *** 37,42 **** --- 37,43 ---- static void add_entry(struct cvs_file *); int kflag = 0; + static u_int added_files = 0; static char kbuf[8]; extern char *logmsg; *************** *** 110,115 **** --- 111,122 ---- cvs_file_run(argc, argv, &cr); + if (added_files != 0) { + cvs_log(LP_NOTICE, "use '%s commit' to add %s " + "permanently", __progname, + (added_files == 1) ? "this file" : "these files"); + } + if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { cvs_client_senddir("."); cvs_client_send_files(argv, argc); *************** *** 405,411 **** static void add_file(struct cvs_file *cf) { ! int added, nb, stop; char revbuf[CVS_REV_BUFSZ]; RCSNUM *head = NULL; char *tag; --- 412,418 ---- static void add_file(struct cvs_file *cf) { ! int nb, stop; char revbuf[CVS_REV_BUFSZ]; RCSNUM *head = NULL; char *tag; *************** *** 425,431 **** rcsnum_tostr(head, revbuf, sizeof(revbuf)); } ! added = stop = 0; switch (cf->file_status) { case FILE_ADDED: case FILE_CHECKOUT: --- 432,438 ---- rcsnum_tostr(head, revbuf, sizeof(revbuf)); } ! stop = 0; switch (cf->file_status) { case FILE_ADDED: case FILE_CHECKOUT: *************** *** 468,478 **** cvs_log(LP_NOTICE, "re-adding file %s " "(instead of dead revision %s)", cf->file_path, revbuf); ! added++; } else if (cf->file_flags & FILE_ON_DISK) { cvs_log(LP_NOTICE, "scheduling file '%s' for addition", cf->file_path); ! added++; } else { stop = 1; } --- 475,485 ---- cvs_log(LP_NOTICE, "re-adding file %s " "(instead of dead revision %s)", cf->file_path, revbuf); ! added_files++; } else if (cf->file_flags & FILE_ON_DISK) { cvs_log(LP_NOTICE, "scheduling file '%s' for addition", cf->file_path); ! added_files++; } else { stop = 1; } *************** *** 488,499 **** return; add_entry(cf); - - if (added != 0) { - cvs_log(LP_NOTICE, "use '%s commit' to add %s " - "permanently", __progname, - (added == 1) ? "this file" : "these files"); - } } static void --- 495,500 ----