summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-12-21 18:32:11 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-12-21 18:32:11 +0000
commit3d46960173efa81ae236b33be993ba399a6f0b38 (patch)
treec8fa65755dfd55440f0bb987516df0f4937e1f0b /usr.bin/cvs/commit.c
parente356bb43f71c5fa2e2b0ee887e8527dd992ba45a (diff)
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
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c16
1 files changed, 7 insertions, 9 deletions
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 <jfb@openbsd.org>
* 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));