summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/checkout.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-02-02 19:32:29 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-02-02 19:32:29 +0000
commit0428996fc892b62a88c3acfad14745d1b7abb409 (patch)
treecf83632f3749be1814986ce44247b74cef8d689e /usr.bin/cvs/checkout.c
parentaafd8f818bad4f10b411084fc1e47d8bf1614e73 (diff)
initial CVSROOT/modules support, only does aliases at the moment (-a).
"modules.c, hurray!" xsa@, ok tobias@
Diffstat (limited to 'usr.bin/cvs/checkout.c')
-rw-r--r--usr.bin/cvs/checkout.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 238649e017b..7e259821b93 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.115 2008/01/31 19:51:40 xsa Exp $ */
+/* $OpenBSD: checkout.c,v 1.116 2008/02/02 19:32:28 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -146,6 +146,7 @@ static void
checkout_check_repository(int argc, char **argv)
{
int i;
+ char *module;
char repo[MAXPATHLEN];
struct cvs_recursion cr;
@@ -196,22 +197,24 @@ checkout_check_repository(int argc, char **argv)
cvs_directory_tag = cvs_specified_tag;
for (i = 0; i < argc; i++) {
+ module = cvs_module_lookup(argv[i]);
+
(void)xsnprintf(repo, sizeof(repo), "%s/%s",
- current_cvsroot->cr_dir, argv[i]);
+ current_cvsroot->cr_dir, module);
- switch (checkout_classify(repo, argv[i])) {
+ switch (checkout_classify(repo, module)) {
case CVS_FILE:
cr.fileproc = cvs_update_local;
cr.flags = flags;
if (build_dirs == 1)
- cvs_mkpath(dirname(argv[i]), cvs_specified_tag);
- cvs_file_run(1, &(argv[i]), &cr);
+ cvs_mkpath(dirname(module), cvs_specified_tag);
+ cvs_file_run(1, &(module), &cr);
break;
case CVS_DIR:
if (build_dirs == 1)
- cvs_mkpath(argv[i], cvs_specified_tag);
- checkout_repository(repo, argv[i]);
+ cvs_mkpath(module, cvs_specified_tag);
+ checkout_repository(repo, module);
break;
default:
break;