From b5f0ecd9305c8f577d16852b607ad02908e01d8b Mon Sep 17 00:00:00 2001 From: jfb Date: Tue, 21 Dec 2004 18:32:09 +0000 Subject: modify the directory handling portion to behave like the one in add.c, which does not attempt to send data when running on a local repository. This will be needed to support local repository access --- usr.bin/cvs/commit.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'usr.bin/cvs/commit.c') diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index b41243c0aac..34f99a63a50 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.12 2004/12/14 22:30:48 jfb Exp $ */ +/* $OpenBSD: commit.c,v 1.13 2004/12/21 18:32:10 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -178,26 +178,24 @@ cvs_commit_prepare(CVSFILE *cf, void *arg) int cvs_commit_file(CVSFILE *cf, void *arg) { + int ret; char *repo, rcspath[MAXPATHLEN], fpath[MAXPATHLEN]; RCSFILE *rf; struct cvsroot *root; struct cvs_ent *entp; + ret = 0; rf = NULL; repo = NULL; root = CVS_DIR_ROOT(cf); if (cf->cf_type == DT_DIR) { - if (cf->cf_cvstat != CVS_FST_UNKNOWN) { - if ((cf->cf_parent != NULL) && - (root != cf->cf_parent->cf_ddat->cd_root)) { - cvs_connect(root); - } - - cvs_senddir(root, cf); + if (root->cr_method != CVS_METHOD_LOCAL) { + if (cf->cf_cvstat != CVS_FST_UNKNOWN) + ret = cvs_senddir(root, cf); } - return (0); + return (ret); } cvs_file_getpath(cf, fpath, sizeof(fpath)); -- cgit v1.2.3-59-g8ed1b