From 4a4be82b078df8fd08c480c177b7c085f04b25d2 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Tue, 30 May 2006 21:00:43 +0000 Subject: prettier output when removing files; --- usr.bin/cvs/remove.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index 88e73c816b6..2ab36aaf2b6 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.48 2006/05/29 08:19:09 xsa Exp $ */ +/* $OpenBSD: remove.c,v 1.49 2006/05/30 21:00:42 joris Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria * @@ -78,6 +78,18 @@ cvs_remove(int argc, char **argv) else cvs_file_run(1, &arg, &cr); + if (existing != 0) { + cvs_log(LP_ERR, "%d file(s) exist, remove them first", + existing); + } + + if (removed != 0) { + if (verbosity > 1) + cvs_log(LP_NOTICE, "use '%s commit' to remove %s " + "permanently", __progname, (removed > 1) ? + "these files" : "this file"); + } + return (0); } @@ -174,17 +186,4 @@ cvs_remove_local(struct cvs_file *cf) break; } } - - if (cf->file_status == FILE_REMOVED) { - if (verbosity > 0) - cvs_log(LP_NOTICE, "use '%s commit' to remove %s " - "permanently", __progname, - (removed == 1) ? "this file" : "these files"); - } else { - if (cf->fd != -1) { - cvs_log(LP_ERR, existing == 1 ? - "%d file exists; remove it first" : - "%d files exist; remove them first", existing); - } - } } -- cgit v1.2.3