version 1.5, 2004/07/30 01:49:22 |
version 1.6, 2004/07/30 18:14:07 |
|
|
|
|
#include "cvs.h" |
#include "cvs.h" |
#include "log.h" |
#include "log.h" |
|
#include "file.h" |
#include "proto.h" |
#include "proto.h" |
|
|
|
|
|
|
cvs_checkout(int argc, char **argv) |
cvs_checkout(int argc, char **argv) |
{ |
{ |
int ch; |
int ch; |
|
CVSFILE *dir; |
struct cvsroot *root; |
struct cvsroot *root; |
|
|
while ((ch = getopt(argc, argv, "")) != -1) { |
while ((ch = getopt(argc, argv, "")) != -1) { |
|
|
return (EX_USAGE); |
return (EX_USAGE); |
} |
} |
|
|
root = cvsroot_get("."); |
dir = cvs_file_get(".", CF_IGNORE|CF_MKADMIN); |
|
root = CVS_DIR_ROOT(dir); |
if (root->cr_method != CVS_METHOD_LOCAL) { |
if (root->cr_method != CVS_METHOD_LOCAL) { |
cvs_connect(root); |
cvs_connect(root); |
} |
} |
|
|
cvs_sendarg(root, argv[0], 0); |
cvs_sendarg(root, argv[0], 0); |
cvs_senddir(root, "."); |
cvs_senddir(root, dir); |
cvs_sendreq(root, CVS_REQ_XPANDMOD, NULL); |
cvs_sendreq(root, CVS_REQ_XPANDMOD, NULL); |
|
|
|
/* XXX not too sure why we have to send this arg */ |
|
cvs_sendarg(root, "-N", 0); |
cvs_sendarg(root, argv[0], 0); |
cvs_sendarg(root, argv[0], 0); |
cvs_senddir(root, "."); |
cvs_senddir(root, dir); |
cvs_sendreq(root, CVS_REQ_CO, NULL); |
cvs_sendreq(root, CVS_REQ_CO, NULL); |
|
|
return (0); |
return (0); |