diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-30 20:37:57 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-12-30 20:37:57 +0000 |
commit | aaf3c33a481c748a8a0e0144ba060b147e3e0533 (patch) | |
tree | c2b466d27a750c15a8e7bdbcd32b32d11c3e5ce9 | |
parent | 0106b1382190def11f13dbfaab2f76ad3960a8ea (diff) |
Send files to add using `Is-Modified' instead of `add', and send
directories regardless of whether they are known or not, in case
they are part of the files to add.
-rw-r--r-- | usr.bin/cvs/add.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index 7d3b9b13571..19ed3e5219d 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.11 2004/12/21 17:50:40 jfb Exp $ */ +/* $OpenBSD: add.c,v 1.12 2004/12/30 20:37:56 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -121,19 +121,16 @@ cvs_add_file(CVSFILE *cf, void *arg) root = CVS_DIR_ROOT(cf); if (cf->cf_type == DT_DIR) { - if (root->cr_method != CVS_METHOD_LOCAL) { - if (cf->cf_cvstat == CVS_FST_UNKNOWN) - ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE, - CVS_FILE_NAME(cf)); - else - ret = cvs_senddir(root, cf); - } + if (root->cr_method != CVS_METHOD_LOCAL) + ret = cvs_senddir(root, cf); return (ret); } if (root->cr_method != CVS_METHOD_LOCAL) { - ret = cvs_sendreq(root, CVS_REQ_ADD, CVS_FILE_NAME(cf)); + if (cf->cf_cvstat == CVS_FST_UNKNOWN) + ret = cvs_sendreq(root, CVS_REQ_ISMODIFIED, + CVS_FILE_NAME(cf)); } else { cvs_log(LP_INFO, "scheduling file `%s' for addition", CVS_FILE_NAME(cf)); |