summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/checkout.c20
-rw-r--r--usr.bin/cvs/client.c6
2 files changed, 21 insertions, 5 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 2d64d2fd11b..2b20fb351c0 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.99 2007/07/25 08:45:24 xsa Exp $ */
+/* $OpenBSD: checkout.c,v 1.100 2007/09/07 19:36:05 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -21,6 +21,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <libgen.h>
#include <string.h>
#include <unistd.h>
@@ -173,8 +174,21 @@ checkout_check_repository(int argc, char **argv)
current_cvsroot->cr_dir, argv[i]);
if (stat(repo, &st) == -1) {
- cvs_log(LP_ERR, "cannot find module `%s' - ignored",
- argv[i]);
+ /* check if a single file was requested */
+ strlcat(repo, RCS_FILE_EXT, MAXPATHLEN);
+
+ if (stat(repo, &st) == -1) {
+ cvs_log(LP_ERR,
+ "cannot find module `%s' - ignored",
+ argv[i]);
+ continue;
+ }
+
+ cr.fileproc = cvs_update_local;
+ cr.flags = flags;
+ cvs_mkpath(dirname(argv[i]), cvs_specified_tag);
+ cvs_file_run(1, &(argv[i]), &cr);
+
continue;
}
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 0bfcfbdbd46..c93d95bbadc 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.76 2007/09/07 19:18:41 tobias Exp $ */
+/* $OpenBSD: client.c,v 1.77 2007/09/07 19:36:05 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -398,7 +398,9 @@ cvs_client_senddir(const char *dir)
cvs_get_repository_path(dir, repo, MAXPATHLEN);
- if (cvs_cmdop != CVS_OP_RLOG)
+ if (cvs_cmdop == CVS_OP_CHECKOUT && strcmp(dir, "."))
+ return;
+ else if (cvs_cmdop != CVS_OP_RLOG)
cvs_client_send_request("Directory %s\n%s", dir, repo);
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s",