diff options
author | peter <peter@FreeBSD.org> | 1998-01-30 15:35:26 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-01-30 15:35:26 +0000 |
commit | 8d9008121631d5e2cb9069de471bc02c92537696 (patch) | |
tree | c23fd255904479c6cd9a3ebb595922ad6a34b998 /contrib/cvs/src | |
parent | 2e8dbe568b7e42b64b8d5d6bb07fc9ecdb5e2f71 (diff) | |
download | FreeBSD-src-8d9008121631d5e2cb9069de471bc02c92537696.zip FreeBSD-src-8d9008121631d5e2cb9069de471bc02c92537696.tar.gz |
Merge vendor changes to files that we've touched onto mainline.
(If only all import/merges were this trivial :-)
Diffstat (limited to 'contrib/cvs/src')
-rw-r--r-- | contrib/cvs/src/cvs.h | 3 | ||||
-rw-r--r-- | contrib/cvs/src/mkmodules.c | 17 | ||||
-rw-r--r-- | contrib/cvs/src/server.c | 35 |
3 files changed, 47 insertions, 8 deletions
diff --git a/contrib/cvs/src/cvs.h b/contrib/cvs/src/cvs.h index 7b50497..7e68639 100644 --- a/contrib/cvs/src/cvs.h +++ b/contrib/cvs/src/cvs.h @@ -800,6 +800,9 @@ void wrap_fromcvs_process_file PROTO ((const char *fileName)); void wrap_add_file PROTO((const char *file,int temp)); void wrap_add PROTO((char *line,int temp)); void wrap_send PROTO ((void)); +#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) +void wrap_unparse_rcs_options PROTO ((char **, int)); +#endif /* SERVER_SUPPORT || CLIENT_SUPPORT */ /* Pathname expansion */ char *expand_path PROTO((char *name, char *file, int line)); diff --git a/contrib/cvs/src/mkmodules.c b/contrib/cvs/src/mkmodules.c index 3c63433..dab5b3f 100644 --- a/contrib/cvs/src/mkmodules.c +++ b/contrib/cvs/src/mkmodules.c @@ -204,15 +204,15 @@ static const char *const checkoutlist_contents[] = { }; static const char *const cvswrappers_contents[] = { - "# This file describes wrappers and other binary files to CVS.\n", + "# This file affects handling of files based on their names.\n", "#\n", - "# Wrappers are the concept where directories of files are to be\n", - "# treated as a single file. The intended use is to wrap up a wrapper\n", - "# into a single tar such that the tar archive can be treated as a\n", - "# single binary file in CVS.\n", + "# The -t/-f options allow one to treat directories of files\n", + "# as a single file, or to transform a file in other ways on\n", + "# its way in and out of CVS.\n", "#\n", - "# To solve the problem effectively, it was also necessary to be able to\n", - "# prevent rcsmerge from merging these files.\n", + "# The -m option specifies whether CVS attempts to merge files.\n", + "#\n", + "# The -k option specifies keyword expansion (e.g. -kb for binary).\n", "#\n", "# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)\n", "#\n", @@ -222,10 +222,11 @@ static const char *const cvswrappers_contents[] = { "# -f from cvs filter value: path to filter\n", "# -t to cvs filter value: path to filter\n", "# -m update methodology value: MERGE or COPY\n", + "# -k expansion mode value: b, o, kkv, &c\n", "#\n", "# and value is a single-quote delimited value.\n", - "#\n", "# For example:\n", + "#*.gif -k 'b'\n", NULL }; diff --git a/contrib/cvs/src/server.c b/contrib/cvs/src/server.c index 509be56..a9dcfec 100644 --- a/contrib/cvs/src/server.c +++ b/contrib/cvs/src/server.c @@ -3781,6 +3781,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; @@ -4050,6 +4082,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 |