diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-12-03 01:02:10 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-12-03 01:02:10 +0000 |
commit | ef47fbf93d2302d521921cce5f98a093b4779e9f (patch) | |
tree | 50d76a77cc19c09cea910a3890611cb290e63bab /usr.bin/cvs/cmd.c | |
parent | 1c6cd252eaeaeedbd87c69d5843ae9550b20ee91 (diff) |
add very basic support for the following stuff:
- checkout in local mode (example: /cvs)
- update in local and server mode (example: /cvs and user@host:/cvs)
- import in local and server mode (example: /cvs and user@host:/cvs)
what remains to be done:
- not all options are supported yet, and update cannot pick up newly
added files yet. these things are pending and will be commited
real soon.
- checkout only works locally right now.
- fix rcs parsing code so that we don't fucking hog 100% cpu
on really BIG BIG BIG ass trees.
mainly tested by pedro@ and myself, thanks a lot pedro!
"go for it" niallo@
Diffstat (limited to 'usr.bin/cvs/cmd.c')
-rw-r--r-- | usr.bin/cvs/cmd.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index d891dd43593..bcb7a6fdec9 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.37 2005/10/22 17:23:21 joris Exp $ */ +/* $OpenBSD: cmd.c,v 1.38 2005/12/03 01:02:08 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -38,6 +38,7 @@ #include "log.h" #include "proto.h" +extern char *cvs_rootstr; /* * Command dispatch table @@ -225,6 +226,16 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) if (!(cmd->cmd_flags & CVS_CMD_ALLOWSPEC) && (argc > 0)) return (CVS_EX_USAGE); + /* + * This allows us to correctly fill in the repository + * string for CVSFILE's fetched inside the repository itself. + */ + if (cvs_cmdop == CVS_OP_SERVER) { + cvs_rootstr = strdup(root->cr_str); + if (cvs_rootstr == NULL) + return (CVS_EX_DATA); + } + cvs_log(LP_TRACE, "cvs_startcmd() CVSROOT=%s", root->cr_str); if ((root->cr_method != CVS_METHOD_LOCAL) && (cvs_connect(root) < 0)) |