diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-11-27 16:04:11 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-11-27 16:04:11 +0000 |
commit | 681034ddda512985b24a250ed61cac186644c013 (patch) | |
tree | f8b5d4b5908738a0478e7da5f4afb6058eac1366 | |
parent | 786d357b477806ed662e9737bdee24cc9be48af5 (diff) |
hook up annotate server bits.
-rw-r--r-- | usr.bin/cvs/client.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/remote.h | 3 | ||||
-rw-r--r-- | usr.bin/cvs/server.c | 12 |
3 files changed, 15 insertions, 4 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c index 0ecfa85ed51..8b7bfe9b2f6 100644 --- a/usr.bin/cvs/client.c +++ b/usr.bin/cvs/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.26 2006/11/14 15:39:41 xsa Exp $ */ +/* $OpenBSD: client.c,v 1.27 2006/11/27 16:04:10 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -86,7 +86,7 @@ struct cvs_req cvs_requests[] = { { "watchers", 0, NULL, 0 }, { "editors", 0, NULL, 0 }, { "init", 0, cvs_server_init, 0 }, - { "annotate", 0, NULL, 0 }, + { "annotate", 0, cvs_server_annotate, 0 }, { "rannotate", 0, NULL, 0 }, { "noop", 0, NULL, 0 }, { "version", 0, cvs_server_version, 0 }, diff --git a/usr.bin/cvs/remote.h b/usr.bin/cvs/remote.h index eb89213fe4c..1181a839ebd 100644 --- a/usr.bin/cvs/remote.h +++ b/usr.bin/cvs/remote.h @@ -1,4 +1,4 @@ -/* $OpenBSD: remote.h,v 1.8 2006/11/14 15:39:42 xsa Exp $ */ +/* $OpenBSD: remote.h,v 1.9 2006/11/27 16:04:10 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -75,6 +75,7 @@ void cvs_server_set(char *); void cvs_server_add(char *); void cvs_server_admin(char *); +void cvs_server_annotate(char *); void cvs_server_commit(char *); void cvs_server_diff(char *); void cvs_server_init(char *); diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index d04fd5681d3..2e31b19eba1 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.39 2006/11/14 15:39:42 xsa Exp $ */ +/* $OpenBSD: server.c,v 1.40 2006/11/27 16:04:10 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -427,6 +427,16 @@ cvs_server_admin(char *data) cvs_server_send_response("ok"); } +void +cvs_server_annotate(char *data) +{ + if (chdir(server_currentdir) == -1) + fatal("cvs_server_annotate: %s", strerror(errno)); + + cvs_cmdop = CVS_OP_ANNOTATE; + cvs_annotate(server_argc, server_argv); + cvs_server_send_response("ok"); +} void cvs_server_commit(char *data) |