=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/commit.c,v retrieving revision 1.145 retrieving revision 1.146 diff -c -r1.145 -r1.146 *** src/usr.bin/cvs/commit.c 2008/08/29 09:54:22 1.145 --- src/usr.bin/cvs/commit.c 2009/03/25 21:50:33 1.146 *************** *** 1,4 **** ! /* $OpenBSD: commit.c,v 1.145 2008/08/29 09:54:22 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: commit.c,v 1.146 2009/03/25 21:50:33 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria *************** *** 110,119 **** if (Fflag && mflag) fatal("cannot specify both a log file and a message"); ! TAILQ_INIT(&files_affected); ! TAILQ_INIT(&files_added); ! TAILQ_INIT(&files_removed); ! TAILQ_INIT(&files_modified); TAILQ_INIT(&files_info); conflicts_found = 0; --- 110,119 ---- if (Fflag && mflag) fatal("cannot specify both a log file and a message"); ! RB_INIT(&files_affected); ! RB_INIT(&files_added); ! RB_INIT(&files_removed); ! RB_INIT(&files_modified); TAILQ_INIT(&files_info); conflicts_found = 0; *************** *** 132,138 **** fatal("%d conflicts found, please correct these first", conflicts_found); ! if (TAILQ_EMPTY(&files_affected)) return (0); if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { --- 132,138 ---- fatal("%d conflicts found, please correct these first", conflicts_found); ! if (RB_EMPTY(&files_affected)) return (0); if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { *************** *** 163,169 **** line_list = cvs_trigger_getlines(CVS_PATH_COMMITINFO, repo); if (line_list != NULL) { ! TAILQ_FOREACH(l, &files_affected, flist) { fi = xcalloc(1, sizeof(*fi)); fi->file_path = xstrdup(l->file_path); TAILQ_INSERT_TAIL(&files_info, fi, --- 163,169 ---- line_list = cvs_trigger_getlines(CVS_PATH_COMMITINFO, repo); if (line_list != NULL) { ! RB_FOREACH(l, cvs_flisthead, &files_affected) { fi = xcalloc(1, sizeof(*fi)); fi->file_path = xstrdup(l->file_path); TAILQ_INSERT_TAIL(&files_info, fi, *************** *** 241,250 **** cvs_trigger_loginfo_header(buf, repo); ! if (!TAILQ_EMPTY(&files_added)) { cvs_buf_puts(buf, "Added Files:"); ! TAILQ_FOREACH(cf, &files_added, flist) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path); --- 241,250 ---- cvs_trigger_loginfo_header(buf, repo); ! if (!RB_EMPTY(&files_added)) { cvs_buf_puts(buf, "Added Files:"); ! RB_FOREACH(cf, cvs_flisthead, &files_added) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path); *************** *** 253,262 **** cvs_buf_putc(buf, '\n'); } ! if (!TAILQ_EMPTY(&files_modified)) { cvs_buf_puts(buf, "Modified Files:"); ! TAILQ_FOREACH(cf, &files_modified, flist) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path); --- 253,262 ---- cvs_buf_putc(buf, '\n'); } ! if (!RB_EMPTY(&files_modified)) { cvs_buf_puts(buf, "Modified Files:"); ! RB_FOREACH(cf, cvs_flisthead, &files_modified) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path); *************** *** 265,274 **** cvs_buf_putc(buf, '\n'); } ! if (!TAILQ_EMPTY(&files_removed)) { cvs_buf_puts(buf, "Removed Files:"); ! TAILQ_FOREACH(cf, &files_removed, flist) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path); --- 265,274 ---- cvs_buf_putc(buf, '\n'); } ! if (!RB_EMPTY(&files_removed)) { cvs_buf_puts(buf, "Removed Files:"); ! RB_FOREACH(cf, cvs_flisthead, &files_removed) { cvs_buf_putc(buf, '\n'); cvs_buf_putc(buf, '\t'); cvs_buf_puts(buf, cf->file_path);