From 44c969d79fa987d0bedace1dd0dc6e4df16c9ff3 Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Sun, 25 Sep 2005 17:38:45 +0000 Subject: use cvs_add_build_entry(); joris ok --- usr.bin/cvs/add.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index 2e826f84b2f..332926b47af 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.31 2005/09/21 16:30:03 xsa Exp $ */ +/* $OpenBSD: add.c,v 1.32 2005/09/25 17:38:44 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005 Xavier Santolaria @@ -47,9 +47,7 @@ static int cvs_add_local(CVSFILE *, void *); static int cvs_add_init(struct cvs_cmd *, int, char **, int *); static int cvs_add_pre_exec(struct cvsroot *); static int cvs_add_directory(CVSFILE *); -#if 0 static int cvs_add_build_entry(CVSFILE *); -#endif struct cvs_cmd cvs_cmd_add = { CVS_OP_ADD, CVS_REQ_ADD, "add", @@ -153,7 +151,7 @@ cvs_add_remote(CVSFILE *cf, void *arg) static int cvs_add_local(CVSFILE *cf, void *arg) { - int added; + int added, ret; char numbuf[64]; added = 0; @@ -197,10 +195,13 @@ cvs_add_local(CVSFILE *cf, void *arg) return (0); } - if (verbosity > 1) { - cvs_log(LP_NOTICE, "scheduling file `%s' for addition", - cf->cf_name); + if ((ret = cvs_add_build_entry(cf)) != 0) + return (ret); + else { added++; + if (verbosity > 1) + cvs_log(LP_NOTICE, "scheduling file `%s' for addition", + cf->cf_name); } if (added != 0) { @@ -317,7 +318,6 @@ cvs_add_directory(CVSFILE *cf) return (0); } -#if 0 static int cvs_add_build_entry(CVSFILE *cf) { @@ -380,4 +380,3 @@ cvs_add_build_entry(CVSFILE *cf) return (0); } -#endif -- cgit v1.2.3