summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-03-09 12:52:34 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-03-09 12:52:34 +0000
commit8399a4744764331d9279d6dd01e94b4615a3be4b (patch)
tree4968744bb8c877c8898f46c2148d7c98641f19e4 /usr.bin
parent8cf93d9dfc77b1b98401231889fcf26b11818f5e (diff)
be sure to build CVS/Root when updating and building directories (-d)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index b60e11e07d7..c06c368db75 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.142 2008/03/09 01:58:00 joris Exp $ */
+/* $OpenBSD: util.c,v 1.143 2008/03/09 12:52:33 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
@@ -43,6 +43,7 @@
#include "remote.h"
extern int print_stdout;
+extern int build_dirs;
/* letter -> mode type map */
static const int cvs_modetypes[26] = {
@@ -534,7 +535,8 @@ cvs_mkadmin(const char *path, const char *root, const char *repo,
if (mkdir(buf, 0755) == -1 && errno != EEXIST)
fatal("cvs_mkadmin: %s: %s", buf, strerror(errno));
- if (cvs_cmdop == CVS_OP_CHECKOUT || cvs_cmdop == CVS_OP_ADD) {
+ if (cvs_cmdop == CVS_OP_CHECKOUT || cvs_cmdop == CVS_OP_ADD ||
+ (cvs_cmdop == CVS_OP_UPDATE && build_dirs == 1)) {
(void)xsnprintf(buf, sizeof(buf), "%s/%s",
path, CVS_PATH_ROOTSPEC);