diff options
author | peter <peter@FreeBSD.org> | 1998-01-30 15:31:47 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-01-30 15:31:47 +0000 |
commit | c3a8ee0e80a59793349940056dfd14746ebd4905 (patch) | |
tree | adf9e1976b05429ac5331df9239a7db06ac88de3 /contrib/cvs/src/server.c | |
parent | e6e45661e44f15cb8c5c6f063080509bd910b98d (diff) | |
download | FreeBSD-src-c3a8ee0e80a59793349940056dfd14746ebd4905.zip FreeBSD-src-c3a8ee0e80a59793349940056dfd14746ebd4905.tar.gz |
Import cvs-1.9.24 since it came quite soon after the snapshot that was
imported a few days ago. There is very little difference, except that
the remote protocol apparently supports wrappers and -k options better.
Diffstat (limited to 'contrib/cvs/src/server.c')
-rw-r--r-- | contrib/cvs/src/server.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/cvs/src/server.c b/contrib/cvs/src/server.c index 8d7d119..a833415 100644 --- a/contrib/cvs/src/server.c +++ b/contrib/cvs/src/server.c @@ -3780,6 +3780,38 @@ serve_gzip_stream (arg) buf_from_net->memory_error); } +/* Tell the client about RCS options set in CVSROOT/cvswrappers. */ +static void +serve_wrapper_sendme_rcs_options (arg) + char *arg; +{ + /* Actually, this is kind of sdrawkcab-ssa: the client wants + * verbatim lines from a cvswrappers file, but the server has + * already parsed the cvswrappers file into the wrap_list struct. + * Therefore, the server loops over wrap_list, unparsing each + * entry before sending it. + */ + char *wrapper_line = NULL; + + wrap_setup (); + + for (wrap_unparse_rcs_options (&wrapper_line, 1); + wrapper_line; + wrap_unparse_rcs_options (&wrapper_line, 0)) + { + buf_output0 (buf_to_net, "Wrapper-rcsOption "); + buf_output0 (buf_to_net, wrapper_line); + buf_output0 (buf_to_net, "\012");; + free (wrapper_line); + } + + buf_output0 (buf_to_net, "ok\012"); + + /* The client is waiting for us, so we better send the data now. */ + buf_flush (buf_to_net, 1); +} + + static void serve_ignore (arg) char *arg; @@ -4049,6 +4081,9 @@ struct request requests[] = REQ_LINE("Argumentx", serve_argumentx, rq_essential), REQ_LINE("Global_option", serve_global_option, rq_optional), REQ_LINE("Gzip-stream", serve_gzip_stream, rq_optional), + REQ_LINE("wrapper-sendme-rcsOptions", + serve_wrapper_sendme_rcs_options, + rq_optional), REQ_LINE("Set", serve_set, rq_optional), #ifdef ENCRYPTION # ifdef HAVE_KERBEROS |