diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-09-26 18:33:55 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-09-26 18:33:55 +0000 |
commit | ea451996f4ee37f5a21f91e880627e66df204609 (patch) | |
tree | e3e20307df60549cc31464a852f442cd875b0797 /usr.bin | |
parent | 764e7a29e04714581236a7ddd6510a222448e90b (diff) |
some more style nits and bits;
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/tag.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c index 5976849f040..9abe81eea42 100644 --- a/usr.bin/cvs/tag.c +++ b/usr.bin/cvs/tag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tag.c,v 1.31 2005/09/26 17:43:48 xsa Exp $ */ +/* $OpenBSD: tag.c,v 1.32 2005/09/26 18:33:54 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004 Joris Vink <joris@openbsd.org> @@ -166,23 +166,24 @@ static int cvs_tag_pre_exec(struct cvsroot *root) { if (root->cr_method != CVS_METHOD_LOCAL) { - if (tag_branch && (cvs_sendarg(root, "-b", 0) < 0)) + if ((tag_branch == 1) && (cvs_sendarg(root, "-b", 0) < 0)) return (CVS_EX_PROTO); - if (tag_delete && (cvs_sendarg(root, "-d", 0) < 0)) + if ((tag_delete ==1) && (cvs_sendarg(root, "-d", 0) < 0)) return (CVS_EX_PROTO); - if (tag_forcemove && (cvs_sendarg(root, "-F", 0) < 0)) + if ((tag_forcemove == 1) && (cvs_sendarg(root, "-F", 0) < 0)) return (CVS_EX_PROTO); - if (tag_forcehead && (cvs_sendarg(root, "-f", 0) < 0)) + if ((tag_forcehead == 1) && (cvs_sendarg(root, "-f", 0) < 0)) return (CVS_EX_PROTO); - if ((tag_oldname) && ((cvs_sendarg(root, "-r", 0) < 0) || + if ((tag_oldname != NULL) && + ((cvs_sendarg(root, "-r", 0) < 0) || (cvs_sendarg(root, tag_oldname, 0) < 0))) return (CVS_EX_PROTO); - if ((tag_date) && ((cvs_sendarg(root, "-D", 0) < 0) || + if ((tag_date != NULL) && ((cvs_sendarg(root, "-D", 0) < 0) || (cvs_sendarg(root, tag_date, 0) < 0))) return (CVS_EX_PROTO); @@ -275,6 +276,14 @@ cvs_tag_local(CVSFILE *cf, void *arg) return (CVS_EX_DATA); } + if (tag_delete == 1) { + /* XXX */ + if (verbosity > 0) + cvs_printf("D %s\n", fpath); + + return (0); + } + if (cvs_noexec == 0) { if (rcs_sym_add(rf, tag_name, tag_rev) < 0) { cvs_log(LP_ERR, "failed to tag %s: %s", rcspath, |