summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-05-30 21:00:43 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-05-30 21:00:43 +0000
commit4a4be82b078df8fd08c480c177b7c085f04b25d2 (patch)
treee352d8445f99d77dcd7ef1596be6162e1a00211e /usr.bin/cvs
parent0d2fcf36ec6693b005eb37945bc891c236f5791f (diff)
prettier output when removing files;
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/remove.c27
1 files 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 <xsa@openbsd.org>
*
@@ -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);
- }
- }
}