diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-12 17:48:19 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-12 17:48:19 +0000 |
commit | 9482cf32d7f0bc408931620f2c9439e595986d56 (patch) | |
tree | 003a003106caab358c56beca5d6a41da9f55618e /usr.bin/cvs | |
parent | fc24ce82f48fa6c395878397f5c90bee81ee3aac (diff) |
If the directory we are updating is unknown, send a Questionable request
instead of attempting to connect to an invalid root specification
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/update.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 5952263d4a5..c17c20d8083 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.5 2004/07/30 20:55:35 jfb Exp $ */ +/* $OpenBSD: update.c,v 1.6 2004/08/12 17:48:18 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -61,7 +61,7 @@ cvs_update(int argc, char **argv) struct cvs_file *cf; cf = NULL; - flags = CF_SORT|CF_RECURSE|CF_IGNORE; + flags = CF_SORT|CF_RECURSE|CF_IGNORE|CF_KNOWN; while ((ch = getopt(argc, argv, "ACD:dflPpQqRr:")) != -1) { switch (ch) { @@ -128,13 +128,20 @@ cvs_update_file(CVSFILE *cf, void *arg) struct cvs_ent *entp; if (cf->cf_type == DT_DIR) { - root = cf->cf_ddat->cd_root; - if ((cf->cf_parent == NULL) || - (root != cf->cf_parent->cf_ddat->cd_root)) { - cvs_connect(root); + if (cf->cf_cvstat == CVS_FST_UNKNOWN) { + root = cf->cf_parent->cf_ddat->cd_root; + cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cf->cf_name); + } + else { + root = cf->cf_ddat->cd_root; + if ((cf->cf_parent == NULL) || + (root != cf->cf_parent->cf_ddat->cd_root)) { + cvs_connect(root); + } + + cvs_senddir(root, cf); } - cvs_senddir(root, cf); return (0); } else |