diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-11-06 11:12:57 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-11-06 11:12:57 +0000 |
commit | f611c535402375ea412b4957d4a28e9da462a0f4 (patch) | |
tree | abc56813e5f02f631355326510f17e4eca2ae6fc /usr.bin/cvs | |
parent | 0e6f8712e07dec2ed5c99a33fb12c4a7f55580c4 (diff) |
- handle global -n flag in conjunction with remove -f.
- better error message.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/remove.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index af7f68ca688..a87bd8a9267 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.55 2006/10/31 15:23:40 xsa Exp $ */ +/* $OpenBSD: remove.c,v 1.56 2006/11/06 11:12:56 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -95,8 +95,9 @@ cvs_remove(int argc, char **argv) cvs_client_get_responses(); } else { if (existing != 0) { - cvs_log(LP_ERR, "%d file(s) exist, remove them first", - existing); + cvs_log(LP_ERR, (existing == 1) ? + "%d file exists; remove it first" : + "%d files exist; remove them first", existing); } if (removed != 0) { @@ -136,7 +137,7 @@ cvs_remove_local(struct cvs_file *cf) return; } - if (force_remove == 1) { + if (force_remove == 1 && cvs_noexec == 0) { if (unlink(cf->file_path) == -1) fatal("cvs_remove_local: %s", strerror(errno)); (void)close(cf->fd); |